<template>
  <div id="container" class="w-full h-full"></div>
</template>

<script setup>
import { getRealData } from '@/api/scada'
import { Leafer, Group, Line, Image, Ellipse, Rect, Text } from 'leafer-ui'
import Gate from '@/assets/images/gate.png'
import Pump from '@/assets/images/Pump.png'
// import Pump0 from '@/assets/images/Pump0.png'
import Pump1 from '@/assets/images/Pump1.png'
import Right from '@/assets/images/right.png'
import { onMounted, onUnmounted } from 'vue'
import { createSwitch, createSwitch2, createSwitch3 } from './group'
const scadaData = ref({})
let updateTimer = null // 添加定时器变量

onMounted(async () => {
  // 创建一个更新文本的函数
  const updateTextElements = () => {
    // 更新所有显示数据的文本
    circle3Text.text = `${scadaData.value.WEHXYZPT109?.toFixed(2) || 0}MPa`
    circle4Text.text = `${scadaData.value.WEHXYZTE102?.toFixed(2) || 0}℃`
    circle5Text.text = `${scadaData.value.JYZDBKZPT1201?.toFixed(2) || 0}MPa`
    circle6Text.text = `${scadaData.value.JYZDBKZTT1201?.toFixed(2) || 0}℃`
    circle8Text.text = `${scadaData.value.JYZDBKZPT101?.toFixed(2) || 0}MPa`
    circle9Text.text = `${scadaData.value.JYZDBKZTT302?.toFixed(2) || 0}℃`

    // 乌尔禾-百克站
    rect3Text.text = `${scadaData.value.flow_weh_bk['出站流量'].toFixed(2) || 0}m³/h`
    rect4Text.text = `${scadaData.value.flow_weh_bk['进站流量'].toFixed(2) || 0}m³/h`

    // 81#站和阀池数据
    circle3CopyText.text = `${scadaData.value.JYDBYZPT050221?.toFixed(2) || 0}MPa`
    circle4CopyText.text = `${scadaData.value.JYDBYZTT050208?.toFixed(2) || 0}℃`
    rect3CopyText.text = `${scadaData.value.flow_81_701['出站流量'].toFixed(2)}m³/h`

    // 701站数据
    rect5Text.text = `${scadaData.value.flow_bk_701['出站流量'].toFixed(2)}m³/h`
    rect7CopyText.text = `${scadaData.value.flow_bk_701['进站流量'].toFixed(2)}m³/h`
    circle5CopyText.text = `${scadaData.value.KWXA701PT1091?.toFixed(2) || 0}MPa`
    circle6CopyText.text = `${scadaData.value.KWXA701TE1091?.toFixed(2) || 0}℃`
    circle8CopyText.text = `${scadaData.value.KWXA701PT1121?.toFixed(2) || 0}MPa`
    circle9CopyText.text = `${scadaData.value.KWXA701TE1121?.toFixed(2) || 0}℃`
    circle10CopyText.text = `${scadaData.value.KWXA701PT1111?.toFixed(2) || 0}MPa`
    circle11CopyText.text = `${scadaData.value.KWXA701TE1111?.toFixed(2) || 0}℃`

    // 总站数据
    circle14CopyText.text = `${scadaData.value.KDXZHZPT1101A?.toFixed(2) || 0}MPa`
    circle15CopyText.text = `${scadaData.value.KDXZHZTT1101?.toFixed(2) || 0}℃`
    rect16CopyText.text = `${scadaData.value.flow_701_z['进站流量'].toFixed(2)}m³/h`
  }
  const getRealDataList = async () => {
    try {
      const res = await getRealData()
      scadaData.value = res.data
      // 只在后续更新时调用更新文本的函数，第一次不调用
      if (updateTimer) {
        updateTextElements()
      }
    } catch (error) {
      console.error('获取实时数据失败:', error)
    }
  }

  // 初始获取一次数据，但不更新文本
  await getRealDataList()

  // 设置定时器，每5秒获取一次最新数据
  updateTimer = setInterval(getRealDataList, 5000)

  const container = document.getElementById('container')
  const { width, height } = container.getBoundingClientRect()

  const baseSize = Math.min(width, height) / 50

  const leafer = new Leafer({
    view: 'container',
    width,
    height,
    fill: '#000'
  })

  // 计算基础尺寸
  const gateSize = Math.min(width, height) * 0.04 // 门的大小为容器较小边的8%
  const verticalGap = height * 0.06 // 垂直间距为高度的15%
  const horizontalOffset = width * 0.005 // 左侧偏移为宽度的10%
  const lineLength = width * 0.06 // 连接线长度为宽度的20%
  // 修改起始y位置
  const startY = 50 // 从20改为50,使整体下移30个像素

  // -------------------------------------- TODO: 箭头文字部分 --------------------------------------
  const group = new Group()
  // 添加箭头图标
  const rightArrow = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 26,
    y: startY + 0.6 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow)

  // 添加百克站文字
  const baikeText = new Text({
    text: '去百克站',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 25,
    y: startY + 0 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(baikeText)
  // 添加箭头图标
  const rightArrow2 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 38,
    y: startY + 0.6 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow2)

  // 添加乌尔禾站文字
  const wuerheText = new Text({
    text: '乌尔禾站来油',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 38,
    y: startY + 0 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(wuerheText)

  // 添加箭头图标
  const rightArrow3 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 38,
    y: startY + 4.6 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow3)

  // 添加百克站文字
  const baikeText2 = new Text({
    text: '百联站来油',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 38,
    y: startY + 4 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(baikeText2)

  // 添加箭头图标
  const rightArrow4 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 2.3 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow4)

  // 添加701站文字
  const qi701Text = new Text({
    text: '去701站',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 1.8 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(qi701Text)

  // 添加箭头图标
  const rightArrow5 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 26,
    y: startY + 7.6 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow5)

  // 添加701站文字
  const qi701Text2 = new Text({
    text: '去701站',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 26,
    y: startY + 7.1 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(qi701Text2)

  // 添加箭头图标
  const rightArrow6 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 41,
    y: startY + 7.6 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow6)

  // 添加81#站文字
  const ba181Text = new Text({
    text: '81#站来油',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 41,
    y: startY + 7.1 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(ba181Text)

  // 添加箭头图标
  const rightArrow7 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 41,
    y: startY + 11.6 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow7)

  // 添加百克站文字
  const baikeText3 = new Text({
    text: '百克站来油',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 41,
    y: startY + 11.1 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(baikeText3)

  // 添加箭头图标
  const rightArrow8 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 8.5 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow8)

  // 添加总站文字
  const zongzhanText = new Text({
    text: '去总站',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 8 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(zongzhanText)

  // 添加箭头图标
  const rightArrow9 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + baseSize * 1,
    y: startY + 13.1 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow9)

  // 添加701站文字
  const qi701Text3 = new Text({
    text: '701站来油',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + baseSize * 1,
    y: startY + 12.6 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(qi701Text3)

  // 添加箭头图标
  const rightArrow10 = new Image({
    url: Right,
    width: baseSize * 3,
    height: baseSize * 2,
    x: horizontalOffset + baseSize * 74,
    y: startY + 6.8 * verticalGap - baseSize // 稍微上移以对齐文字
  })
  group.add(rightArrow10)

  // 添加克石化文字
  const qi701Text4 = new Text({
    text: '去克石化',
    fill: '#fff',
    fontSize: baseSize * 1.2,
    x: horizontalOffset + baseSize * 73,
    y: startY + 6.35 * verticalGap - baseSize,
    textAlign: 'left'
  })
  group.add(qi701Text4)

  // -------------------------------------- TODO: 添加5个红色站场名字 --------------------------------------
  const titleText = new Text({
    text: '乌尔禾站',
    fill: '#f00',
    fontSize: baseSize * 1.5,
    x: horizontalOffset + lineLength + baseSize * 26,
    y: startY + 4.1 * verticalGap, // 第二行位置
    textAlign: 'left'
  })
  group.add(titleText)

  const titleText2 = new Text({
    text: '百克站',
    fill: '#f00',
    fontSize: baseSize * 1.5,
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 4.1 * verticalGap, // 第二行位置
    textAlign: 'left'
  })
  group.add(titleText2)

  const titleText3 = new Text({
    text: '81#站',
    fill: '#f00',
    fontSize: baseSize * 1.5,
    x: horizontalOffset + lineLength + baseSize * 26,
    y: startY + 10.5 * verticalGap, // 第二行位置
    textAlign: 'left'
  })
  group.add(titleText3)

  const titleText4 = new Text({
    text: '701站',
    fill: '#f00',
    fontSize: baseSize * 1.5,
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 10.9 * verticalGap, // 第二行位置
    textAlign: 'left'
  })
  group.add(titleText4)

  const titleText5 = new Text({
    text: '总站',
    fill: '#f00',
    fontSize: baseSize * 1.5,
    x: horizontalOffset + lineLength + baseSize * 27,
    y: startY + 14 * verticalGap, // 第二行位置
    textAlign: 'left'
  })
  group.add(titleText5)

  // -------------------------------------- TODO: 乌尔禾站 --------------------------------------

  // 添加门图标
  const gate0 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: startY + 0 * verticalGap - 20
  })
  group.add(gate0)

  const gateText0 = new Text({
    text: `WEH-G-1`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: startY + 0 * verticalGap - 20 - baseSize, // 将文字放在gate上方
    textAlign: 'left'
  })
  group.add(gateText0)

  const horizontalLine0 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize,
      startY - 20 + 0 * verticalGap + gateSize / 2,
      horizontalOffset + lineLength,
      startY - 20 + 0 * verticalGap + gateSize / 2
    ]
  })
  group.add(horizontalLine0)

  const switch1_0 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    startY - 20 + 0 * verticalGap + gateSize / 2,
    '#9f998f'
  )
  group.add(switch1_0)

  // 添加右侧的竖线
  const verticalSegment0 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      startY - 20 + 0 * verticalGap + gateSize / 2, // 每段的起点
      horizontalOffset + lineLength,
      startY + 2.2 * verticalGap + 7 // 起点y // 每段的终点
    ]
  })
  group.add(verticalSegment0)

  // 添加门图标
  const gate1 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: startY + 1 * verticalGap - 20
  })
  group.add(gate1)

  const gateText1 = new Text({
    text: `WEH-G-2`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: startY + 1 * verticalGap - 20 - baseSize, // 将文字放在gate上方
    textAlign: 'left'
  })
  group.add(gateText1)

  const horizontalLine1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize,
      startY - 20 + 1 * verticalGap + gateSize / 2,
      horizontalOffset + lineLength,
      startY - 20 + 1 * verticalGap + gateSize / 2
    ]
  })
  group.add(horizontalLine1)

  const switch1_1 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    startY - 20 + 1 * verticalGap + gateSize / 2,
    '#9f998f'
  )
  group.add(switch1_1)

  const verticalSegment1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      startY - 20 + 1 * verticalGap + gateSize / 2, // 每段的起点
      horizontalOffset + lineLength,
      startY + 2.2 * verticalGap + 7 // 起点y // 每段的终点
    ]
  })
  group.add(verticalSegment1)

  const gate2 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: startY + 2 * verticalGap - 20
  })
  group.add(gate2)

  const gateText2 = new Text({
    text: `WEH-G-3`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: startY + 2 * verticalGap - 20 - baseSize, // 将文字放在gate上方
    textAlign: 'left'
  })
  group.add(gateText2)

  const horizontalLine2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize,
      startY - 20 + 2 * verticalGap + gateSize / 2,
      horizontalOffset + lineLength,
      startY - 20 + 2 * verticalGap + gateSize / 2
    ]
  })
  group.add(horizontalLine2)

  const switch1_2 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    startY - 20 + 2 * verticalGap + gateSize / 2,
    '#9f998f'
  )
  group.add(switch1_2)

  const verticalSegment2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      startY - 20 + 2 * verticalGap + gateSize / 2, // 每段的起点
      horizontalOffset + lineLength,
      startY + 2.2 * verticalGap + 7 // 起点y // 每段的终点
    ]
  })
  group.add(verticalSegment2)

  const gate3 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: startY + 3 * verticalGap - 20
  })
  group.add(gate3)

  const gateText3 = new Text({
    text: `WEH-G-4`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: startY + 3 * verticalGap - 20 - baseSize, // 将文字放在gate上方
    textAlign: 'left'
  })
  group.add(gateText3)

  const horizontalLine3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize,
      startY - 20 + 3 * verticalGap + gateSize / 2,
      horizontalOffset + lineLength,
      startY - 20 + 3 * verticalGap + gateSize / 2
    ]
  })
  group.add(horizontalLine3)

  const switch1_3 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    startY - 20 + 3 * verticalGap + gateSize / 2,
    '#9f998f'
  )
  group.add(switch1_3)

  const verticalSegment3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      startY - 20 + 3 * verticalGap + gateSize / 2, // 每段的起点
      horizontalOffset + lineLength,
      startY + 2.2 * verticalGap + 7 // 起点y // 每段的终点
    ]
  })
  group.add(verticalSegment3)

  const gate4 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: startY + 4 * verticalGap - 20
  })
  group.add(gate4)

  const gateText4 = new Text({
    text: `WEH-G-5`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: startY + 4 * verticalGap - 20 - baseSize, // 将文字放在gate上方
    textAlign: 'left'
  })
  group.add(gateText4)

  const horizontalLine4 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize,
      startY - 20 + 4 * verticalGap + gateSize / 2,
      horizontalOffset + lineLength,
      startY - 20 + 4 * verticalGap + gateSize / 2
    ]
  })
  group.add(horizontalLine4)

  const switch1_4 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    startY - 20 + 4 * verticalGap + gateSize / 2,
    '#9f998f'
  )
  group.add(switch1_4)

  const verticalSegment4 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      startY - 20 + 4 * verticalGap + gateSize / 2, // 每段的起点
      horizontalOffset + lineLength,
      startY + 2.2 * verticalGap + 7 // 起点y // 每段的终点
    ]
  })
  group.add(verticalSegment4)

  const gate5 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: startY + 5 * verticalGap - 20
  })
  group.add(gate5)

  const gateText5 = new Text({
    text: `WEH-G-6`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: startY + 5 * verticalGap - 20 - baseSize, // 将文字放在gate上方
    textAlign: 'left'
  })
  group.add(gateText5)

  const horizontalLine5 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize,
      startY - 20 + 5 * verticalGap + gateSize / 2,
      horizontalOffset + lineLength,
      startY - 20 + 5 * verticalGap + gateSize / 2
    ]
  })
  group.add(horizontalLine5)

  const switch1_5 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    startY - 20 + 5 * verticalGap + gateSize / 2,
    '#9f998f'
  )
  group.add(switch1_5)

  const verticalSegment5 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      startY - 20 + 5 * verticalGap + gateSize / 2, // 每段的起点
      horizontalOffset + lineLength,
      startY + 2.2 * verticalGap + 7 // 起点y // 每段的终点
    ]
  })
  group.add(verticalSegment5)

  // 先添加水平连接线，确保它在最底层
  const horizontalConnector = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength, // 起点x
      startY + 2.2 * verticalGap + 5, // 起点y
      horizontalOffset + lineLength + baseSize * 14, // 终点x
      startY + 2.2 * verticalGap + 5 // 终点y
    ]
  })
  group.add(horizontalConnector)

  // 然后再添加其他几何体
  const circle1 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize,
    y: startY + 2.15 * verticalGap
  })
  group.add(circle1)

  // 添加监测数据
  const circle1Text = new Text({
    text: `${0}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize,
    y: startY + 1.8 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle1Text)

  const circle2 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 4,
    y: startY + 2.15 * verticalGap
  })
  group.add(circle2)

  // 添加监测数据
  const circle2Text = new Text({
    text: `${0}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 4,
    y: startY + 2.5 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle2Text)

  // const rect1 = new Rect({
  //   width: baseSize * 1.6,
  //   height: baseSize * 0.8,
  //   fill: '#9f998f',
  //   stroke: '#fff',
  //   x: horizontalOffset + lineLength + baseSize * 7,
  //   y: startY + 2.15 * verticalGap
  // })
  // group.add(rect1)

  // // 添加监测数据
  // const rect1Text = new Text({
  //   text: `${0}m³/h`,
  //   fill: '#fff',
  //   fontSize: baseSize * 0.7,
  //   x: horizontalOffset * 0.5 + lineLength + baseSize * 7,
  //   y: startY + 1.8 * verticalGap,
  //   textAlign: 'left'
  // })
  // group.add(rect1Text)
  const switch2 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 12,
    startY + 2.2 * verticalGap + 5,
    '#9f998f'
  )
  group.add(switch2)

  // ------------------------乌尔禾左半部分阀门打开--------------------
  // horizontalLine0.stroke = '#00FF00'
  // switch1_0.updateColor('#00FF00')
  // verticalSegment0.stroke = '#00FF00'
  // horizontalLine1.stroke = '#00FF00'
  // switch1_1.updateColor('#00FF00')
  // verticalSegment1.stroke = '#00FF00'
  // horizontalLine2.stroke = '#00FF00'
  // switch1_2.updateColor('#00FF00')
  // verticalSegment2.stroke = '#00FF00'
  // horizontalLine3.stroke = '#00FF00'
  // switch1_3.updateColor('#00FF00')
  // verticalSegment3.stroke = '#00FF00'
  // horizontalLine4.stroke = '#00FF00'
  // switch1_4.updateColor('#00FF00')
  // verticalSegment4.stroke = '#00FF00'
  // horizontalLine5.stroke = '#00FF00'
  // switch1_5.updateColor('#00FF00')
  // verticalSegment5.stroke = '#00FF00'
  // horizontalConnector.stroke = '#00FF00'
  // switch2.updateColor('#00FF00')

  // 百克站泵相关
  const rightVerticalLine1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 0.4 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 14, // x2
      startY + 2.3 * verticalGap // y2
    ]
  })
  group.add(rightVerticalLine1)

  const rightVerticalLine2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 2.3 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 14, // x2
      startY + 5 * verticalGap // y2
    ]
  })
  group.add(rightVerticalLine2)

  // 添加三根横线
  const line0 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 0.4 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 0.4 * verticalGap // y2
    ]
  })
  group.add(line0)

  // 添加泵的文字标签
  const pumpText0 = new Text({
    text: `WEH-B-1`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 0.4 * verticalGap - gateSize - baseSize + 10, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText0)

  const pump0 = new Image({
    url: Pump,
    width: gateSize * 1.4,
    height: gateSize * 1.4,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 0.4 * verticalGap - gateSize / 2
  })

  group.add(pump0)

  const line1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 2.2 * verticalGap + 5, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 2.2 * verticalGap + 5 // y2
    ]
  })
  group.add(line1)

  // 添加泵的文字标签
  const pumpText1 = new Text({
    text: `WEH-B-2`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 2.2 * verticalGap + 5 - gateSize - baseSize + 10, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText1)

  const pump1 = new Image({
    url: Pump,
    width: gateSize * 1.4,
    height: gateSize * 1.4,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 2.2 * verticalGap + 5 - gateSize / 2
  })
  group.add(pump1)

  const line2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 5 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 5 * verticalGap // y2
    ]
  })
  group.add(line2)

  // 添加泵的文字标签
  const pumpText2 = new Text({
    text: `WEH-B-3`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 5 * verticalGap - gateSize - baseSize + 10, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText2)

  const pump2 = new Image({
    url: Pump,
    width: gateSize * 1.4,
    height: gateSize * 1.4,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 5 * verticalGap - gateSize / 2
  })
  group.add(pump2)

  const farRightVerticalLine1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 20, // x1
      startY + 0.4 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 2.3 * verticalGap // y2
    ]
  })
  group.add(farRightVerticalLine1)

  const farRightVerticalLine2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 20, // x1
      startY + 2.3 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 5 * verticalGap // y2
    ]
  })
  group.add(farRightVerticalLine2)

  // 先添加水平连接线，确保它在最底层
  const horizontalConnector2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 20, // 起点x
      startY + 2.2 * verticalGap + 5, // 起点y
      horizontalOffset + lineLength + baseSize * 37, // 终点x
      startY + 2.2 * verticalGap + 5 // 终点y
    ]
  })
  group.add(horizontalConnector2)

  const switch3 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 24,
    startY + 2.2 * verticalGap + 5,
    '#9f998f'
  )
  group.add(switch3)

  const circle3 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 26,
    y: startY + 2.15 * verticalGap
  })
  group.add(circle3)

  // 添加监测数据
  const circle3Text = new Text({
    text: `${scadaData.value.WEHXYZPT109.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 26,
    y: startY + 1.8 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle3Text)

  const circle4 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 29,
    y: startY + 2.15 * verticalGap
  })
  group.add(circle4)

  // 添加监测数据
  const circle4Text = new Text({
    text: `${scadaData.value.WEHXYZTE102.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 29,
    y: startY + 2.5 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle4Text)

  const rect3 = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 32,
    y: startY + 2.15 * verticalGap
  })
  group.add(rect3)

  // 添加监测数据
  const rect3Text = new Text({
    text: `${scadaData.value.flow_weh_bk['出站流量'].toFixed(2)}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 32,
    y: startY + 1.8 * verticalGap,
    textAlign: 'left'
  })
  group.add(rect3Text)

  // 添加右侧的虚线
  const dashedLine = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.001),
    dashPattern: [5, 5], // 定义虚线的样式，5像素实线，5像素空白
    points: [
      horizontalOffset + lineLength + baseSize * 37, // x1
      0, // y1
      horizontalOffset + lineLength + baseSize * 37, // x2
      startY + 5.8 * verticalGap // y2
    ]
  })
  group.add(dashedLine)

  // ----------------乌尔禾右半部分阀门打开-------------------------
  // 第一个泵
  // rightVerticalLine1.stroke = '#00FF00'
  // line0.stroke = '#00FF00'
  // farRightVerticalLine1.stroke = '#00FF00'
  // horizontalConnector2.stroke = '#00FF00'
  // switch3.updateColor('#00FF00')
  // pump0.url = Pump1

  // 第二个泵
  // line1.stroke = '#00FF00'
  // horizontalConnector2.stroke = '#00FF00'
  //  horizontalConnector2.stroke = '#00FF00'
  //  switch3.updateColor('#00FF00')
  // pump1.url=Pump1

  // 第三个泵
  // line2.stroke = '#00FF00'
  // farRightVerticalLine2.stroke = '#00FF00'
  // rightVerticalLine2.stroke = '#00FF00'
  // horizontalConnector2.stroke = '#00FF00'
  // switch3.updateColor('#00FF00')
  // pump2.url=Pump1

  // -------------------------------------- TODO: 百克站 --------------------------------------
  // 先添加水平连接线，确保它在最底层
  const horizontalConnector4 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 37, // 起点x
      startY + 2.2 * verticalGap + 5, // 起点y
      horizontalOffset + lineLength + baseSize * 55, // 终点x
      startY + 2.35 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector4)

  const switch4 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 40,
    startY + 2.2 * verticalGap + 5,
    '#9f998f'
  )
  group.add(switch4)

  const circle5 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 43,
    y: startY + 2.15 * verticalGap
  })
  group.add(circle5)

  // 添加监测数据
  const circle5Text = new Text({
    text: `${scadaData.value.JYZDBKZPT1201.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 43,
    y: startY + 1.8 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle5Text)

  const circle6 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 46,
    y: startY + 2.15 * verticalGap
  })
  group.add(circle6)

  // 添加监测数据
  const circle6Text = new Text({
    text: `${scadaData.value.JYZDBKZTT1201.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 46,
    y: startY + 2.5 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle6Text)

  const rect4 = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 49,
    y: startY + 2.2 * verticalGap
  })
  group.add(rect4)

  // 添加监测数据
  const rect4Text = new Text({
    text: `${scadaData.value.flow_weh_bk['进站流量'].toFixed(2)}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 49,
    y: startY + 1.8 * verticalGap,
    textAlign: 'left'
  })
  group.add(rect4Text)

  const verticalLineV081_1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    zIndex: 2,
    points: [
      horizontalOffset + lineLength + baseSize * 55, // x1
      startY + 0.7 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 55, // x2
      startY + 2.35 * verticalGap // y2
    ]
  })
  group.add(verticalLineV081_1)

  const verticalLineV081_2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    zIndex: 2,
    points: [
      horizontalOffset + lineLength + baseSize * 55, // x1
      startY + 2.35 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 55, // x2
      startY + 5.2 * verticalGap // y2
    ]
  })
  group.add(verticalLineV081_2)

  const switch5 = createSwitch3(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 55,
    startY + 3.5 * verticalGap,
    '#9f998f'
  )
  group.add(switch5)

  const switchText2 = new Text({
    text: 'V081',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 56.6,
    y: startY + 3.3 * verticalGap, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText2)

  const horizontalConnectorV041 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    zIndex: 3,
    points: [
      horizontalOffset + lineLength + baseSize * 55, // 起点x
      startY + 0.7 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 59, // 终点x
      startY + 0.7 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnectorV041)

  const horizontalConnectorV049 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    zIndex: 2,
    points: [
      horizontalOffset + lineLength + baseSize * 55, // 起点x
      startY + 0.7 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 63, // 终点x
      startY + 0.7 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnectorV049)

  const horizontalConnectorV049_1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 55, // 起点x
      startY + 0.7 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 67, // 终点x
      startY + 0.7 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnectorV049_1)

  const horizontalConnectorV049_2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 55, // 起点x
      startY + 0.7 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 71, // 终点x
      startY + 0.7 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnectorV049_2)

  const horizontalConnectorV049_3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 71, // 起点x
      startY + 0.7 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 76, // 终点x
      startY + 0.7 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnectorV049_3)

  const verticalLine14 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 76, // x1
      startY + 0.4 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 76, // x2
      startY + 1 * verticalGap // y2
    ]
  })
  group.add(verticalLine14)

  const verticalLine21 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 59, // x2
      startY + 0.7 * verticalGap // y2
    ]
  })
  group.add(verticalLine21)

  const verticalLine22 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 60, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 60, // x2
      startY + 0.6 * verticalGap // y2
    ]
  })
  group.add(verticalLine22)

  const verticalLine23 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 63, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 63, // x2
      startY + 0.7 * verticalGap // y2
    ]
  })
  group.add(verticalLine23)

  const verticalLine24 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 64, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 64, // x2
      startY + 0.6 * verticalGap // y2
    ]
  })
  group.add(verticalLine24)

  const verticalLine25 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 67, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 67, // x2
      startY + 0.7 * verticalGap // y2
    ]
  })
  group.add(verticalLine25)
  const verticalLine26 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 68, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 68, // x2
      startY + 0.6 * verticalGap // y2
    ]
  })
  group.add(verticalLine26)

  const verticalLine27 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 71, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 71, // x2
      startY + 0.7 * verticalGap // y2
    ]
  })
  group.add(verticalLine27)
  const verticalLine28 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 72, // x1
      0.8 * startY, // y1
      horizontalOffset + lineLength + baseSize * 72, // x2
      startY + 0.6 * verticalGap // y2
    ]
  })
  group.add(verticalLine28)

  const switch14 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 59,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch14)

  const switchText14 = new Text({
    text: 'V041',
    fill: '#9f998f',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + lineLength + baseSize * 58,
    y: startY + 0.1 * verticalGap, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText14)
  const switch15 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 60,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch15)

  const switchText15 = new Text({
    text: 'V042',
    fill: '#9f998f',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + lineLength + baseSize * 61,
    y: startY + 0.1 * verticalGap, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText15)
  const Gate7 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset + lineLength + baseSize * 58.4,
    y: 0.2 * startY
  })
  group.add(Gate7)

  // 添加第一行文字 "BKZ-"
  const gate7Text1 = new Text({
    text: 'BKZ-',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 56.5,
    y: 10, // 第一行位置
    textAlign: 'left'
  })
  group.add(gate7Text1)

  // 添加第二行文字 "G-1"
  const gate7Text2 = new Text({
    text: 'G-1',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 56.5,
    y: 25, // 第二行位置
    textAlign: 'left'
  })
  group.add(gate7Text2)

  const switch16 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 63,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch16)

  const switchText16 = new Text({
    text: 'V049',
    fill: '#9f998f',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + lineLength + baseSize * 62.2,
    y: startY + 0.1 * verticalGap, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText16)
  const switch17 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 64,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch17)

  const switchText17 = new Text({
    text: 'V050',
    fill: '#9f998f',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + lineLength + baseSize * 65,
    y: startY + 0.1 * verticalGap, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText17)
  const Gate8 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset + lineLength + baseSize * 62.5,
    y: 0.2 * startY
  })
  group.add(Gate8)
  const switch18 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 67,
    1.35 * startY,
    '#9f998f'
  )
  // 添加第一行文字 "BKZ-"
  const gate7Text3 = new Text({
    text: 'BKZ-',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 60.5,
    y: 10, // 第一行位置
    textAlign: 'left'
  })
  group.add(gate7Text3)

  // 添加第二行文字 "G-1"
  const gate7Text4 = new Text({
    text: 'G-2',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 60.5,
    y: 25, // 第二行位置
    textAlign: 'left'
  })
  group.add(gate7Text4)
  group.add(switch18)
  const switch19 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 68,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch19)

  const Gate9 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset + lineLength + baseSize * 66.5,
    y: 0.2 * startY
  })
  group.add(Gate9)

  // 添加第一行文字 "BKZ-"
  const gate7Text5 = new Text({
    text: 'BKZ-',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 64.5,
    y: 10, // 第一行位置
    textAlign: 'left'
  })
  group.add(gate7Text5)

  // 添加第二行文字 "G-1"
  const gate7Text6 = new Text({
    text: 'G-3',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 64.5,
    y: 25, // 第二行位置
    textAlign: 'left'
  })
  group.add(gate7Text6)
  const switch20 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 71,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch20)
  const switch21 = createSwitch3(
    width * 0.8,
    height * 0.8,
    horizontalOffset + lineLength + baseSize * 72,
    1.35 * startY,
    '#9f998f'
  )
  group.add(switch21)

  const Gate10 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset + lineLength + baseSize * 70.5,
    y: 0.2 * startY
  })
  group.add(Gate10)

  // 添加第一行文字 "BKZ-"
  const gate7Text7 = new Text({
    text: 'BKZ-',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 68.5,
    y: 10, // 第一行位置
    textAlign: 'left'
  })
  group.add(gate7Text7)

  // 添加第二行文字 "G-1"
  const gate7Text8 = new Text({
    text: 'G-4',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 68.5,
    y: 25, // 第二行位置
    textAlign: 'left'
  })
  group.add(gate7Text8)

  const horizontalConnector6_1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    zIndex: 2,
    points: [
      horizontalOffset + lineLength + baseSize * 40, // 起点x
      startY + 5.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 55, // 终点x
      startY + 5.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector6_1)

  const horizontalConnector6_2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 55, // 起点x
      startY + 5.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 59, // 终点x
      startY + 5.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector6_2)

  const horizontalConnector8 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 5.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 73, // 终点x
      startY + 5.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector8)

  const switch6 = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 57,
    startY + 5.2 * verticalGap,
    '#9f998f'
  )
  group.add(switch6)

  const switchText3 = new Text({
    text: 'V082',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 57,
    y: startY + 5.4 * verticalGap, // 第二行位置
    textAlign: 'center'
    // rotation: 270, // 添加90度旋转
    // origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText3)

  const verticalLine4 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // x1
      startY + 5.2 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 59, // x2
      startY + 4.4 * verticalGap // y2
    ]
  })
  group.add(verticalLine4)
  const horizontalConnector10 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 4.4 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 72, // 终点x
      startY + 4.4 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector10)

  const verticalLine5 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // x1
      startY + 4.4 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 59, // x2
      startY + 3.2 * verticalGap // y2
    ]
  })
  group.add(verticalLine5)

  const horizontalConnector13_1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 72, // 起点x
      startY + 3.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 73, // 终点x
      startY + 3.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector13_1)

  const horizontalConnector13_2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 73, // 起点x
      startY + 3.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 89, // 终点x
      startY + 3.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector13_2)

  const verticalLine11 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 73, // x1
      startY + 5.2 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 73, // x2
      startY + 3.2 * verticalGap // y2
    ]
  })
  group.add(verticalLine11)

  const switch8 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 74.6,
    startY + 3.2 * verticalGap,
    '#9f998f'
  )
  group.add(switch8)

  const circle8 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 3.05 * verticalGap
  })
  group.add(circle8)

  // 添加监测数据
  const circle8Text = new Text({
    text: `${scadaData.value.JYZDBKZPT101.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 75,
    y: startY + 2.7 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle8Text)

  const circle9 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 77.5,
    y: startY + 3.05 * verticalGap
  })
  group.add(circle9)

  // 添加监测数据
  const circle9Text = new Text({
    text: `${scadaData.value.JYZDBKZTT302.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 77.5,
    y: startY + 3.4 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle9Text)

  const rect5 = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 79,
    y: startY + 3.05 * verticalGap
  })
  group.add(rect5)

  // 添加监测数据
  const rect5Text = new Text({
    text: `${scadaData.value.flow_bk_701['出站流量'].toFixed(2)}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 78.5,
    y: startY + 2.7 * verticalGap,
    textAlign: 'left'
  })
  group.add(rect5Text)

  const horizontalConnector11 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 3.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 72, // 终点x
      startY + 3.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector11)
  const verticalLine6 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // x1
      startY + 3.2 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 59, // x2
      startY + 2 * verticalGap // y2
    ]
  })
  group.add(verticalLine6)

  const horizontalConnector12 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 72, // 终点x
      startY + 2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector12)

  const verticalLine9 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 72, // x1
      startY + 2 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 72, // x2
      startY + 3.2 * verticalGap // y2
    ]
  })
  group.add(verticalLine9)

  const verticalLine10 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 72, // x1
      startY + 3.2 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 72, // x2
      startY + 4.4 * verticalGap // y2
    ]
  })
  group.add(verticalLine10)

  // 在每条横线上添加泵
  const pump4 = new Image({
    url: Pump,
    width: gateSize * 1.2,
    height: gateSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 64,
    y: startY + 2 * verticalGap - gateSize / 2
  })
  group.add(pump4)
  const pump5 = new Image({
    url: Pump,
    width: gateSize * 1.2,
    height: gateSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 64,
    y: startY + 3.2 * verticalGap - gateSize / 2
  })
  group.add(pump5)
  const pump6 = new Image({
    url: Pump,
    width: gateSize * 1.2,
    height: gateSize * 1.2,
    x: horizontalOffset + lineLength + baseSize * 64,
    y: startY + 4.4 * verticalGap - gateSize / 2
  })
  group.add(pump6)
  // 添加泵的文字标签
  const PumpText2 = new Text({
    text: 'BKZ-B-1',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 64,
    y: startY + 2.1 * verticalGap - gateSize / 2 - 25, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(PumpText2)

  const pumpText3 = new Text({
    text: 'BKZ-B-2',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 64,
    y: startY + 3.3 * verticalGap - gateSize / 2 - 25, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText3)

  const pumpText4 = new Text({
    text: 'BKZ-B-3',
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 64,
    y: startY + 4.5 * verticalGap - gateSize / 2 - 25, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText4)

  const verticalLine7 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // x1
      startY + 2 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 59, // x2
      startY + 1.2 * verticalGap // y2
    ]
  })
  group.add(verticalLine7)

  // BKZ-B-1上面的线
  const horizontalConnector91 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 1.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 60, // 终点x
      startY + 1.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector91)

  const horizontalConnector92 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 60, // 起点x
      startY + 1.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 64, // 终点x
      startY + 1.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector92)

  const horizontalConnector93 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 64, // 起点x
      startY + 1.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 68, // 终点x
      startY + 1.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector93)

  const horizontalConnector94 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 68, // 起点x
      startY + 1.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 72, // 终点x
      startY + 1.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector94)

  const horizontalConnector95 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 72, // 起点x
      startY + 1.2 * verticalGap, // 起点y
      horizontalOffset + lineLength + baseSize * 78, // 终点x
      startY + 1.2 * verticalGap // 终点y
    ]
  })
  group.add(horizontalConnector95)

  const switch7 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 68,
    startY + 5.2 * verticalGap,
    '#9f998f'
  )
  group.add(switch7)

  // const switchText4 = new Text({
  //   text: 'V001',
  //   fill: '#9f998f',
  //   fontSize: baseSize * 0.9,
  //   x: horizontalOffset + lineLength + baseSize * 68,
  //   y: startY + 5.4 * verticalGap, // 第二行位置
  //   textAlign: 'center'
  //   // rotation: 270, // 添加90度旋转
  //   // origin: 'center' // 设置旋转中心点为文字中心
  // })
  // group.add(switchText4)
  const circle7 = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 42,
    y: startY + 5.05 * verticalGap
  })
  group.add(circle7)

  // 添加监测数据
  const circle7Text = new Text({
    text: `${0}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.5 + lineLength + baseSize * 42,
    y: startY + 4.6 * verticalGap,
    textAlign: 'left'
  })
  group.add(circle7Text)

  // const rect7 = new Rect({
  //   width: baseSize * 1.6,
  //   height: baseSize * 0.8,
  //   zIndex: 2,
  //   fill: '#9f998f',
  //   stroke: '#fff',
  //   x: horizontalOffset + lineLength + baseSize * 46,
  //   y: startY + 5.05 * verticalGap
  // })
  // group.add(rect7)

  // // 添加监测数据
  // const rect7Text = new Text({
  //   text: `${0}m³/h`,
  //   fill: '#fff',
  //   fontSize: baseSize * 0.7,
  //   x: horizontalOffset * 0.5 + lineLength + baseSize * 46,
  //   y: startY + 5.4 * verticalGap,
  //   textAlign: 'left'
  // })
  // group.add(rect7Text)

  const shortLineLength = verticalGap * 0.2

  // 创建第一条短线
  const x0 = horizontalOffset + lineLength + baseSize * 60 // x坐标
  const verticalShortLine0 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      x0, // x1
      startY + 1.05 * verticalGap - 1.2 * shortLineLength, // y1 (向上延伸一半)
      x0, // x2
      startY + 1.2 * verticalGap // y2 (向下延伸一半)
    ]
  })
  group.add(verticalShortLine0)

  // 创建第二条短线
  const x1 = horizontalOffset + lineLength + baseSize * 64 // x坐标
  const verticalShortLine1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      x1, // x1
      startY + 1.05 * verticalGap - 1.2 * shortLineLength, // y1 (向上延伸一半)
      x1, // x2
      startY + 1.2 * verticalGap // y2 (向下延伸一半)
    ]
  })
  group.add(verticalShortLine1)

  // 创建第三条短线
  const x2 = horizontalOffset + lineLength + baseSize * 68 // x坐标
  const verticalShortLine2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      x2, // x1
      startY + 1.05 * verticalGap - 1.2 * shortLineLength, // y1 (向上延伸一半)
      x2, // x2
      startY + 1.2 * verticalGap // y2 (向下延伸一半)
    ]
  })
  group.add(verticalShortLine2)

  // 创建第四条短线
  const x3 = horizontalOffset + lineLength + baseSize * 72 // x坐标
  const verticalShortLine3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      x3, // x1
      startY + 1.05 * verticalGap - 1.2 * shortLineLength, // y1 (向上延伸一半)
      x3, // x2
      startY + 1.2 * verticalGap // y2 (向下延伸一半)
    ]
  })
  group.add(verticalShortLine3)

  const verticalLine8 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 78, // x1
      startY + 0.9 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 78, // x2
      startY + 1.5 * verticalGap // y2
    ]
  })
  group.add(verticalLine8)

  const dashedLine2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.001),
    dashPattern: [5, 5], // 定义虚线的样式，5像素实线，5像素空白
    points: [
      0, // x1
      startY + 5.8 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 90, // x2
      startY + 5.8 * verticalGap // y2
    ]
  })
  group.add(dashedLine2)

  // V041
  // horizontalConnector4.stroke = '#00FF00'
  // switch4.updateColor('#00FF00')
  // verticalLineV081_1.stroke = '#00FF00'
  // horizontalConnectorV041.stroke = '#00FF00'
  // verticalLine21.stroke = '#00FF00'
  // switch14.updateColor('#00FF00')
  // V042 && B-1
  // verticalLine22.stroke = '#00FF00'
  // switch8.updateColor('#00FF00')
  // switch15.updateColor('#00FF00')
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector12.stroke = '#00FF00'
  // verticalLine9.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // verticalShortLine0.stroke = '#00FF00'
  // pump4.url = Pump1
  // V042 && B-2
  // verticalLine22.stroke = '#00FF00'
  // switch8.updateColor('#00FF00')
  // switch15.updateColor('#00FF00')
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector11.stroke = '#00FF00'
  //  verticalLine6.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // verticalShortLine0.stroke = '#00FF00'
  // pump5.url=Pump1
  // V042 && B-3
  // verticalLine22.stroke = '#00FF00'
  // switch8.updateColor('#00FF00')
  // switch15.updateColor('#00FF00')
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector10.stroke = '#00FF00'
  // verticalLine5.stroke = '#00FF00'
  // verticalLine6.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // verticalLine10.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // verticalShortLine0.stroke = '#00FF00'
  // pump6.url=Pump1
  // V049 && V081
  // verticalLineV081_1.stroke = '#00FF00'
  // verticalLineV081_2.stroke = '#00FF00'
  // switch5.updateColor('#00FF00')
  // horizontalConnectorV041.stroke = '#00FF00'
  // horizontalConnector6_1.stroke = '#00FF00'
  // verticalLineV081_1.stroke = '#00FF00'
  // horizontalConnectorV049.stroke = '#00FF00'
  // verticalLine23.stroke = '#00FF00'
  // switch16.updateColor('#00FF00')
  // V082 && B-1
  // switch6.updateColor('#00FF00')
  // switch8.updateColor('#00FF00')
  // verticalLine4.stroke = '#00FF00'
  // verticalLine5.stroke = '#00FF00'
  // verticalLine6.stroke = '#00FF00'
  // verticalLine9.stroke = '#00FF00'
  // horizontalConnector12.stroke = '#00FF00'
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector6_1.stroke = '#00FF00'
  // horizontalConnector6_2.stroke = '#00FF00'
  // pump4.url = Pump1
  // V082 && B-2
  // switch6.updateColor('#00FF00')
  // switch8.updateColor('#00FF00')
  // verticalLine4.stroke = '#00FF00'
  // verticalLine5.stroke = '#00FF00'
  // horizontalConnector11.stroke = '#00FF00'
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector6_1.stroke = '#00FF00'
  // horizontalConnector6_2.stroke = '#00FF00'
  //  pump5.url=Pump1
  // V082 && B-3
  // switch6.updateColor('#00FF00')
  // switch8.updateColor('#00FF00')
  // verticalLine4.stroke = '#00FF00'
  // verticalLine10.stroke = '#00FF00'
  // horizontalConnector10.stroke = '#00FF00'
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector6_1.stroke = '#00FF00'
  // horizontalConnector6_2.stroke = '#00FF00'
  // pump6.url=Pump1
  // V050 && B-1
  // verticalLine24.stroke = '#00FF00'
  // switch8.updateColor('#00FF00')
  // switch17.updateColor('#00FF00')
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector12.stroke = '#00FF00'
  // verticalLine9.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // horizontalConnector92.stroke = '#00FF00'
  // verticalShortLine1.stroke = '#00FF00'
  // pump4.url=Pump1
  // V050 && B-2
  // verticalLine24.stroke = '#00FF00'
  // switch8.updateColor('#00FF00')
  // switch17.updateColor('#00FF00')
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector11.stroke = '#00FF00'
  // verticalLine6.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // horizontalConnector92.stroke = '#00FF00'
  // verticalShortLine1.stroke = '#00FF00'
  // pump5.url=Pump1
  // V050 && B-3
  // verticalLine24.stroke = '#00FF00'
  // switch8.updateColor('#00FF00')
  // switch17.updateColor('#00FF00')
  // horizontalConnector13_1.stroke = '#00FF00'
  // horizontalConnector13_2.stroke = '#00FF00'
  // horizontalConnector10.stroke = '#00FF00'
  // verticalLine5.stroke = '#00FF00'
  // verticalLine6.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // verticalLine10.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // horizontalConnector92.stroke = '#00FF00'
  // verticalShortLine1.stroke = '#00FF00'
  // pump6.url=Pump1

  // 之前逻辑搞错的
  // V049
  // horizontalConnector4.stroke = '#00FF00'
  // switch4.updateColor('#00FF00')
  // verticalLineV081_1.stroke = '#00FF00'
  // horizontalConnectorV049.stroke = '#00FF00'
  // verticalLine23.stroke = '#00FF00'
  // switch16.updateColor('#00FF00')

  // V041 && V081
  // verticalLineV081_1.stroke = '#00FF00'
  // verticalLineV081_2.stroke = '#00FF00'
  // switch5.updateColor('#00FF00')
  // horizontalConnectorV041.stroke = '#00FF00'
  // verticalLine21.stroke = '#00FF00'
  // switch14.updateColor('#00FF00')
  // horizontalConnector6_1.stroke = '#00FF00'
  // V042 && V082
  // switch6.updateColor('#00FF00')
  // verticalLine4.stroke = '#00FF00'
  // verticalLine5.stroke = '#00FF00'
  // verticalLine6.stroke = '#00FF00'
  // verticalLine7.stroke = '#00FF00'
  // horizontalConnector91.stroke = '#00FF00'
  // verticalLine22.stroke = '#00FF00'
  // verticalShortLine0.stroke = '#00FF00'
  // switch15.updateColor('#00FF00')
  // horizontalConnector6_1.stroke = '#00FF00'
  // horizontalConnector6_2.stroke = '#00FF00'

  // -------------------------------------- TODO: 81#站 --------------------------------------

  // 复制上面的图形到虚线之间
  const offsetY = 6.3 * verticalGap // 向下偏移的距离
  const group2 = new Group()

  // 1. 复制左侧的竖线
  const verticalSegmentCopy0 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 0 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 1.42 * verticalGap + gateSize / 2 + offsetY
    ]
  })
  group2.add(verticalSegmentCopy0)

  const verticalSegmentCopy1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 1 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 1.42 * verticalGap + gateSize / 2 + offsetY
    ]
  })
  group2.add(verticalSegmentCopy1)

  const verticalSegmentCopy2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 1.42 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 2 * verticalGap + gateSize / 2 + offsetY
    ]
  })
  group2.add(verticalSegmentCopy2)

  const verticalSegmentCopy3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 1.42 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 3 * verticalGap + gateSize / 2 + offsetY
    ]
  })
  group2.add(verticalSegmentCopy3)

  // 2. 复制左侧的门和水平连接线
  // 第一组
  const gateCopy0 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 0 * verticalGap + offsetY
  })

  const gateText01 = new Text({
    text: `81-G-1`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 0 * verticalGap - 20 + offsetY,
    textAlign: 'left'
  })
  group.add(gateText01)

  const lineCopy0 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize / 2,
      1.2 * startY + 1.3 * 0 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 0 * verticalGap + gateSize / 2 + offsetY
    ]
  })

  const switch1Copy0 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    1.2 * startY + 1.3 * 0 * verticalGap + gateSize / 2 + offsetY,
    '#9f998f'
  )

  group2.add(lineCopy0)
  group2.add(switch1Copy0)
  group2.add(gateCopy0)

  // 第二组
  const gateCopy1 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 1 * verticalGap + offsetY
  })

  const gateText11 = new Text({
    text: `81-G-2`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 1 * verticalGap - 20 + offsetY,
    textAlign: 'left'
  })
  group.add(gateText11)

  const lineCopy1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize / 2,
      1.2 * startY + 1.3 * 1 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 1 * verticalGap + gateSize / 2 + offsetY
    ]
  })

  const switch1Copy1 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    1.2 * startY + 1.3 * 1 * verticalGap + gateSize / 2 + offsetY,
    '#9f998f'
  )

  group2.add(lineCopy1)
  group2.add(switch1Copy1)
  group2.add(gateCopy1)

  // 第三组
  const gateCopy2 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 2 * verticalGap + offsetY
  })

  const gateText21 = new Text({
    text: `81-G-3`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 2 * verticalGap - 20 + offsetY,
    textAlign: 'left'
  })
  group.add(gateText21)

  const lineCopy2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize / 2,
      1.2 * startY + 1.3 * 2 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 2 * verticalGap + gateSize / 2 + offsetY
    ]
  })

  const switch1Copy2 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    1.2 * startY + 1.3 * 2 * verticalGap + gateSize / 2 + offsetY,
    '#9f998f'
  )

  group2.add(lineCopy2)
  group2.add(switch1Copy2)
  group2.add(gateCopy2)

  // 第四组
  const gateCopy3 = new Image({
    url: Gate,
    width: gateSize,
    height: gateSize,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 3 * verticalGap + offsetY
  })

  const gateText31 = new Text({
    text: `81-G-4`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset,
    y: 1.2 * startY + 1.3 * 3 * verticalGap - 20 + offsetY,
    textAlign: 'left'
  })
  group.add(gateText31)

  const lineCopy3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + gateSize / 2,
      1.2 * startY + 1.3 * 3 * verticalGap + gateSize / 2 + offsetY,
      horizontalOffset + lineLength,
      1.2 * startY + 1.3 * 3 * verticalGap + gateSize / 2 + offsetY
    ]
  })

  const switch1Copy3 = createSwitch(
    width,
    height,
    horizontalOffset + lineLength / 2 + gateSize / 2,
    1.2 * startY + 1.3 * 3 * verticalGap + gateSize / 2 + offsetY,
    '#9f998f'
  )

  group2.add(lineCopy3)
  group2.add(switch1Copy3)
  group2.add(gateCopy3)

  // 3. 复制第一个水平连接区域
  const horizontalConnectorCopy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength, // 起点x
      startY + 2.35 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 14, // 终点x
      startY + 2.35 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnectorCopy)

  // 复制圆形和矩形元素
  const circle1Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize,
    y: startY + 2.2 * verticalGap + offsetY
  })
  group2.add(circle1Copy)

  // 添加监测数据
  const circle1CopyText = new Text({
    text: `${0}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize,
    y: startY + 1.85 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle1CopyText)

  const circle2Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 4,
    y: startY + 2.2 * verticalGap + offsetY
  })
  group2.add(circle2Copy)

  // 添加监测数据
  const circle2CopyText = new Text({
    text: `${0}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 4,
    y: startY + 2.5 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle2CopyText)

  // const rect1Copy = new Rect({
  //   width: baseSize * 1.6,
  //   height: baseSize * 0.8,
  //   fill: '#9f998f',
  //   stroke: '#fff',
  //   x: horizontalOffset + lineLength + baseSize * 7,
  //   y: startY + 2.2 * verticalGap + offsetY
  // })
  // group2.add(rect1Copy)

  // // 添加监测数据
  // const rect1CopyText = new Text({
  //   text: `${0}m³/h`,
  //   fill: '#fff',
  //   fontSize: baseSize * 0.7,
  //   x: horizontalOffset * 0.6 + lineLength + baseSize * 7,
  //   y: startY + 1.85 * verticalGap + offsetY,
  //   textAlign: 'left'
  // })
  // group.add(rect1CopyText)

  const switch2Copy = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 12,
    startY + 2.35 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch2Copy)

  // 复制右侧竖线
  const rightVerticalLinesCopy1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 0.4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 14, // x2
      startY + 2.35 * verticalGap + offsetY // y2
    ]
  })
  group2.add(rightVerticalLinesCopy1)

  const rightVerticalLinesCopy2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 2.35 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 14, // x2
      startY + 5 * verticalGap + offsetY // y2
    ]
  })
  group2.add(rightVerticalLinesCopy2)

  // 复制三根横线及其上的泵
  const lineCopy00 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 0.4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 0.4 * verticalGap + offsetY // y2
    ]
  })
  group2.add(lineCopy00)

  // 复制泵
  const pumpCopy0 = new Image({
    url: Pump,
    width: gateSize * 1.4,
    height: gateSize * 1.4,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 0.4 * verticalGap + offsetY - gateSize / 2
  })
  group2.add(pumpCopy0)

  // 添加泵的文字标签
  const pumpText4_0 = new Text({
    text: `81-B-1`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 0.4 * verticalGap + offsetY - gateSize - baseSize + 10, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText4_0)

  const lineCopy11 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 2.35 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 2.35 * verticalGap + offsetY // y2
    ]
  })
  group2.add(lineCopy11)

  // 复制泵
  const pumpCopy1 = new Image({
    url: Pump,
    width: gateSize * 1.4,
    height: gateSize * 1.4,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 2.35 * verticalGap + offsetY - gateSize / 2
  })
  group2.add(pumpCopy1)

  // 添加泵的文字标签
  const pumpText4_1 = new Text({
    text: `81-B-2`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 2.35 * verticalGap + offsetY - gateSize - baseSize + 10, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText4_1)

  const lineCopy22 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 14, // x1
      startY + 5 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 5 * verticalGap + offsetY // y2
    ]
  })
  group2.add(lineCopy22)

  // 复制泵
  const pumpCopy2 = new Image({
    url: Pump,
    width: gateSize * 1.4,
    height: gateSize * 1.4,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 5 * verticalGap + offsetY - gateSize / 2
  })
  group2.add(pumpCopy2)

  // 添加泵的文字标签
  const pumpText4_2 = new Text({
    text: `81-B-3`,
    fill: '#fff',
    fontSize: baseSize * 0.8,
    x: horizontalOffset + lineLength + baseSize * 16,
    y: startY + 5 * verticalGap + offsetY - gateSize - baseSize + 10, // 将文字放在泵上方
    textAlign: 'left'
  })
  group.add(pumpText4_2)

  const farRightVerticalLines1Copy1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 20, // x1
      startY + 0.4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 2.34 * verticalGap + offsetY // y2
    ]
  })
  group2.add(farRightVerticalLines1Copy1)

  const farRightVerticalLines1Copy2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 20, // x1
      startY + 2.34 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 20, // x2
      startY + 5 * verticalGap + offsetY // y2
    ]
  })
  group2.add(farRightVerticalLines1Copy2)

  // 先添加水平连接线，确保它在最底层
  const horizontalConnector2Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 20, // 起点x
      startY + 2.35 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 40, // 终点x
      startY + 2.35 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector2Copy)

  const switch3Copy = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 24,
    startY + 8.65 * verticalGap,
    '#9f998f'
  )
  group2.add(switch3Copy)

  const switchText5 = new Text({
    text: 'V050201',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 24,
    y: startY + 8.8 * verticalGap, // 第二行位置
    textAlign: 'center'
  })
  group.add(switchText5)
  const circle3Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 28,
    y: startY + 8.5 * verticalGap
  })
  group2.add(circle3Copy)

  // 添加监测数据
  const circle3CopyText = new Text({
    text: `${scadaData.value.JYDBYZPT050221.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 28,
    y: startY + 1.85 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle3CopyText)

  const circle4Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 32,
    y: startY + 8.5 * verticalGap
  })
  group2.add(circle4Copy)

  // 添加监测数据
  const circle4CopyText = new Text({
    text: `${scadaData.value.JYDBYZTT050208.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 32,
    y: startY + 2.5 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle4CopyText)

  const rect3Copy = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 35,
    y: startY + 8.5 * verticalGap
  })
  group2.add(rect3Copy)

  // 添加监测数据
  const rect3CopyText = new Text({
    text: `${scadaData.value.flow_81_701['出站流量'].toFixed(2)}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 35,
    y: startY + 1.85 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(rect3CopyText)

  // verticalSegmentCopy0.stroke = '#00FF00'
  // verticalSegmentCopy1.stroke = '#00FF00'
  // verticalSegmentCopy2.stroke = '#00FF00'
  // verticalSegmentCopy3.stroke = '#00FF00'
  // lineCopy0.stroke = '#00FF00'
  // switch1Copy0.updateColor('#00FF00')
  // lineCopy1.stroke = '#00FF00'
  // switch1Copy1.updateColor('#00FF00')
  // lineCopy2.stroke = '#00FF00'
  // switch1Copy2.updateColor('#00FF00')
  // lineCopy3.stroke = '#00FF00'
  // switch1Copy3.updateColor('#00FF00')
  // horizontalConnectorCopy.stroke = '#00FF00'
  // switch2Copy.updateColor('#00FF00')
  // horizontalConnector2Copy.stroke = '#00FF00'
  // switch3Copy.updateColor('#00FF00')

  // 第一种情况
  // rightVerticalLinesCopy1.stroke = '#00FF00'
  // lineCopy00.stroke = '#00FF00'
  // farRightVerticalLines1Copy1.stroke = '#00FF00'
  // pumpCopy0.url=Pump1
  // 第二种情况
  // lineCopy11.stroke = '#00FF00'
  // pumpCopy1.url=Pump1
  // 第三种情况
  // rightVerticalLinesCopy2.stroke = '#00FF00'
  // lineCopy22.stroke = '#00FF00'
  // farRightVerticalLines1Copy2.stroke = '#00FF00'
  // pumpCopy2.url=Pump1
  // -------------------------------------- TODO: 701站 --------------------------------------
  // 复制第三个水平连接区域
  const horizontalConnector4Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 40, // 起点x
      startY + 2.35 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 55, // 终点x
      startY + 2.35 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector4Copy)

  const switch4Copy = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 42,
    startY + 2.35 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch4Copy)

  // const switchText6 = new Text({
  //   text: 'V1046',
  //   fill: '#9f998f',
  //   fontSize: baseSize * 0.9,
  //   x: horizontalOffset + lineLength + baseSize * 42,
  //   y: startY + 2.5 * verticalGap + offsetY, // 第二行位置
  //   textAlign: 'center'
  // })
  // group.add(switchText6)

  const circle5Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 45,
    y: startY + 2.2 * verticalGap + offsetY
  })
  group2.add(circle5Copy)

  // 添加监测数据
  const circle5CopyText = new Text({
    text: `${scadaData.value.KWXA701PT1091.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 45,
    y: startY + 1.85 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle5CopyText)

  const circle6Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 48,
    y: startY + 2.2 * verticalGap + offsetY
  })
  group2.add(circle6Copy)

  // 添加监测数据
  const circle6CopyText = new Text({
    text: `${scadaData.value.KWXA701TE1091.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 48,
    y: startY + 2.5 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle6CopyText)

  const rect4Copy = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 51,
    y: startY + 2.2 * verticalGap + offsetY
  })
  group2.add(rect4Copy)

  // 添加监测数据
  const rect4CopyText = new Text({
    text: `${0}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 51,
    y: startY + 1.85 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(rect4CopyText)

  // V1046线
  const verticalLineV1046 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 55, // x1
      startY + 0.4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 55, // x2
      startY + 2.35 * verticalGap + offsetY // y2
    ]
  })
  group2.add(verticalLineV1046)

  const switchV1046 = createSwitch3(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 55,
    startY + 1.5 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switchV1046)

  const switchV1046Text = new Text({
    text: 'V1046',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 56,
    y: startY + 1.3 * verticalGap + offsetY, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchV1046Text)

  // 添加罐区矩形框
  const tankAreaRectV046 = new Rect({
    width: baseSize * 4, // 调整宽度
    height: baseSize * 2, // 调整高度
    // fill: '#fff',
    stroke: '#fff',
    strokeWidth: Math.max(1, width * 0.001),
    x: horizontalOffset + lineLength + baseSize * 53, // 在线的末端
    y: startY + 0.96 * offsetY // 垂直居中对齐
  })
  group2.add(tankAreaRectV046)

  // 添加"罐区"文字
  const tankAreaTextV046 = new Text({
    text: '罐区',
    fill: '#fff',
    fontSize: baseSize,
    x: horizontalOffset + lineLength + baseSize * 55, // 文字位置微调
    y: startY + 0.97 * offsetY, // 文字垂直居中
    textAlign: 'center'
  })
  group2.add(tankAreaTextV046)

  const verticalLine2Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // x1
      startY + 0.4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 59, // x2
      startY + 2.35 * verticalGap + offsetY // y2
    ]
  })
  group2.add(verticalLine2Copy)

  const switch5Copy = createSwitch3(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 59,
    startY + 1.5 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch5Copy)

  const switchText7 = new Text({
    text: 'V1068',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 60,
    y: startY + 1.3 * verticalGap + offsetY, // 第二行位置
    textAlign: 'center',
    rotation: 270, // 添加90度旋转
    origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText7)

  const horizontalConnector12Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 0.4 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 66, // 终点x
      startY + 0.4 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector12Copy)

  const dashedLine3 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.001),
    dashPattern: [5, 5], // 定义虚线的样式，5像素实线，5像素空白
    points: [
      0, // x1
      startY + 12 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 90, // x2
      startY + 12 * verticalGap // y2
    ]
  })
  group.add(dashedLine3)

  const horizontalConnector5Copy1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 55, // 起点x
      startY + 2.35 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 59, // 终点x
      startY + 2.35 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector5Copy1)

  const horizontalConnector5Copy2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 59, // 起点x
      startY + 2.35 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 65, // 终点x
      startY + 2.35 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector5Copy2)

  const switch6Copy = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 62,
    startY + 2.35 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch6Copy)

  const switchText8 = new Text({
    text: 'V1129',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 62,
    y: startY + 2.55 * verticalGap + offsetY, // 第二行位置
    textAlign: 'center'
    // rotation: 270, // 添加90度旋转
    // origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText8)

  const verticalLine3Copy1 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 65, // x1
      startY + 3.2 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 65, // x2
      startY + 2.35 * verticalGap + offsetY // y2
    ]
  })
  group2.add(verticalLine3Copy1)

  const verticalLine3Copy2 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 65, // x1
      startY + 4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 65, // x2
      startY + 3.2 * verticalGap + offsetY // y2
    ]
  })
  group2.add(verticalLine3Copy2)

  const horizontalConnector7Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 65, // 起点x
      startY + 3.2 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 80, // 终点x
      startY + 3.2 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector7Copy)

  const switch7Copy = createSwitch(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 69,
    startY + 3.2 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch7Copy)

  const circle8Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 71,
    y: startY + 3.05 * verticalGap + offsetY
  })
  group2.add(circle8Copy)

  // 添加监测数据
  const circle8CopyText = new Text({
    text: `${scadaData.value.KWXA701PT1121.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 71,
    y: startY + 2.7 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle8CopyText)

  const circle9Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 73,
    y: startY + 3.05 * verticalGap + offsetY
  })
  group2.add(circle9Copy)

  // 添加监测数据
  const circle9CopyText = new Text({
    text: `${scadaData.value.KWXA701TE1121.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 73,
    y: startY + 3.4 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle9CopyText)

  const rect6Copy = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 76,
    y: startY + 3.05 * verticalGap + offsetY
  })
  group2.add(rect6Copy)

  // 添加监测数据
  const rect6CopyText = new Text({
    text: `${0}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 76,
    y: startY + 2.7 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(rect6CopyText)

  const horizontalConnector8Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 41, // 起点x
      startY + 4 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 56, // 终点x
      startY + 4 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector8Copy)

  const switch8Copy = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 43,
    startY + 4 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch8Copy)

  const circle10Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 46,
    y: startY + 3.85 * verticalGap + offsetY
  })
  group2.add(circle10Copy)

  // 添加监测数据
  const circle10CopyText = new Text({
    text: `${scadaData.value.KWXA701PT1111.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 46,
    y: startY + 3.5 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle10CopyText)

  const circle11Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 48,
    y: startY + 3.85 * verticalGap + offsetY
  })
  group2.add(circle11Copy)

  // 添加监测数据
  const circle11CopyText = new Text({
    text: `${scadaData.value.KWXA701TE1111.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 48,
    y: startY + 4.2 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle11CopyText)

  const rect7Copy = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + lineLength + baseSize * 51,
    y: startY + 3.85 * verticalGap + offsetY
  })
  group2.add(rect7Copy)

  // 添加监测数据
  const rect7CopyText = new Text({
    text: `${scadaData.value.flow_bk_701['进站流量'].toFixed(2)}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset * 0.6 + lineLength + baseSize * 51,
    y: startY + 3.5 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(rect7CopyText)

  const horizontalConnector9Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 56, // 起点x
      startY + 5.35 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 66, // 终点x
      startY + 5.35 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector9Copy)

  const switchV1045 = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 62,
    startY + 5.3 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switchV1045)

  const switchTextV1045 = new Text({
    text: 'V1045',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 62,
    y: startY + 4.75 * verticalGap + offsetY, // 第二行位置
    textAlign: 'center'
    // rotation: 270, // 添加90度旋转
    // origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchTextV1045)
  // 添加罐区矩形框
  const tankAreaRect = new Rect({
    width: baseSize * 4, // 调整宽度
    height: baseSize * 2, // 调整高度
    // fill: '#fff',
    stroke: '#fff',
    strokeWidth: Math.max(1, width * 0.001),
    x: horizontalOffset + lineLength + baseSize * 66, // 在线的末端
    y: startY + 5.25 * verticalGap + offsetY - baseSize // 垂直居中对齐
  })
  group2.add(tankAreaRect)

  // 添加"罐区"文字
  const tankAreaText = new Text({
    text: '罐区',
    fill: '#fff',
    fontSize: baseSize,
    x: horizontalOffset + lineLength + baseSize * 68, // 文字位置微调
    y: startY + 5.2 * verticalGap + offsetY - baseSize * 0.6, // 文字垂直居中
    textAlign: 'center'
  })
  group2.add(tankAreaText)

  const verticalLine4Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 56, // x1
      startY + 4 * verticalGap + offsetY, // y1
      horizontalOffset + lineLength + baseSize * 56, // x2
      startY + 5.35 * verticalGap + offsetY // y2
    ]
  })
  group2.add(verticalLine4Copy)

  const horizontalConnector10Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + lineLength + baseSize * 56, // 起点x
      startY + 4 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 65, // 终点x
      startY + 4 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector10Copy)

  const switch10Copy = createSwitch2(
    width,
    height,
    horizontalOffset + lineLength + baseSize * 62,
    startY + 4 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch10Copy)

  const switchText11 = new Text({
    text: 'V1128',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + lineLength + baseSize * 62,
    y: startY + 4.2 * verticalGap + offsetY, // 第二行位置
    textAlign: 'center'
    // rotation: 270, // 添加90度旋转
    // origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText11)

  const dashedLine4 = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.001),
    dashPattern: [5, 5], // 定义虚线的样式，5像素实线，5像素空白
    points: [
      horizontalOffset + lineLength + baseSize * 40, // x1
      startY + 5.8 * verticalGap, // y1
      horizontalOffset + lineLength + baseSize * 40, // x2
      startY + 15.8 * verticalGap // y2
    ]
  })
  group.add(dashedLine4)

  // 第一种情况
  // horizontalConnector4Copy.stroke = '#00FF00'
  // switch4Copy.updateColor('#00FF00')
  // verticalLineV1046.stroke = '#00FF00'
  // switchV1046.updateColor('#00FF00')
  // 第二种情况
  // horizontalConnector4Copy.stroke = '#00FF00'
  // switch4Copy.updateColor('#00FF00')
  // verticalLine2Copy.stroke = '#00FF00'
  // switch5Copy.updateColor('#00FF00')
  // horizontalConnector12Copy.stroke = '#00FF00'
  // horizontalConnector5Copy1.stroke = '#00FF00'
  // 第三种情况
  // horizontalConnector4Copy.stroke = '#00FF00'
  // switch4Copy.updateColor('#00FF00')
  // horizontalConnector5Copy1.stroke = '#00FF00'
  // horizontalConnector5Copy2.stroke = '#00FF00'
  // switch6Copy.updateColor('#00FF00')
  // verticalLine3Copy1.stroke = '#00FF00'
  // horizontalConnector7Copy.stroke = '#00FF00'
  // switch7Copy.updateColor('#00FF00')
  // 第四种情况
  // horizontalConnector7Copy.stroke = '#00FF00'
  // switch7Copy.updateColor('#00FF00')
  // verticalLine3Copy2.stroke = '#00FF00'
  // horizontalConnector8Copy.stroke = '#00FF00'
  // switch8Copy.updateColor('#00FF00')
  // horizontalConnector10Copy.stroke = '#00FF00'
  // switch10Copy.updateColor('#00FF00')
  // 第五种情况
  // horizontalConnector8Copy.stroke = '#00FF00'
  // switch8Copy.updateColor('#00FF00')
  // horizontalConnector9Copy.stroke = '#00FF00'
  // switchV1045.updateColor('#00FF00')
  // verticalLine4Copy.stroke = '#00FF00'

  // -------------------------------------- TODO: 总站 --------------------------------------
  const horizontalConnector13Copy = new Line({
    stroke: '#9f998f',
    strokeWidth: Math.max(1, width * 0.002),
    points: [
      horizontalOffset + baseSize * 0, // 起点x
      startY + 7.8 * verticalGap + offsetY, // 起点y
      horizontalOffset + lineLength + baseSize * 22, // 终点x
      startY + 7.8 * verticalGap + offsetY // 终点y
    ]
  })
  group2.add(horizontalConnector13Copy)

  const circle14Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + baseSize * 2,
    y: startY + 7.65 * verticalGap + offsetY
  })
  group2.add(circle14Copy)

  // 添加监测数据
  const circle14CopyText = new Text({
    text: `${scadaData.value.KDXZHZPT1101A.toFixed(2)}MPa`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + baseSize * 2,
    y: startY + 7.3 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle14CopyText)

  const circle15Copy = new Ellipse({
    width: 16,
    height: 16,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + baseSize * 5,
    y: startY + 7.65 * verticalGap + offsetY
  })
  group2.add(circle15Copy)

  // 添加监测数据
  const circle15CopyText = new Text({
    text: `${scadaData.value.KDXZHZTT1101.toFixed(2)}℃`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + baseSize * 5,
    y: startY + 8 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(circle15CopyText)

  const rect16Copy = new Rect({
    width: baseSize * 1.6,
    height: baseSize * 0.8,
    fill: '#9f998f',
    stroke: '#fff',
    x: horizontalOffset + baseSize * 9,
    y: startY + 7.65 * verticalGap + offsetY
  })

  // 添加监测数据
  const rect16CopyText = new Text({
    text: `${scadaData.value.flow_701_z['进站流量'].toFixed(2)}m³/h`,
    fill: '#fff',
    fontSize: baseSize * 0.7,
    x: horizontalOffset + baseSize * 9,
    y: startY + 7.3 * verticalGap + offsetY,
    textAlign: 'left'
  })
  group.add(rect16CopyText)

  const switch13Copy = createSwitch2(
    width,
    height,
    horizontalOffset + baseSize * 16,
    startY + 7.8 * verticalGap + offsetY,
    '#9f998f'
  )
  group2.add(switch13Copy)

  const switchText13 = new Text({
    text: 'V1100',
    fill: '#9f998f',
    fontSize: baseSize * 0.9,
    x: horizontalOffset + baseSize * 16,
    y: startY + 8 * verticalGap + offsetY, // 第二行位置
    textAlign: 'center'
    // rotation: 270, // 添加90度旋转
    // origin: 'center' // 设置旋转中心点为文字中心
  })
  group.add(switchText13)

  // 添加罐区矩形框
  const tankAreaRect3 = new Rect({
    width: baseSize * 4, // 调整宽度
    height: baseSize * 2, // 调整高度
    // fill: '#fff',
    stroke: '#fff',
    strokeWidth: Math.max(1, width * 0.001),
    x: horizontalOffset + lineLength + baseSize * 22, // 在线的末端
    y: startY + 7.8 * verticalGap + offsetY - baseSize // 垂直居中对齐
  })
  group2.add(tankAreaRect3)

  // 添加"罐区"文字
  const tankAreaText3 = new Text({
    text: '罐区',
    fill: '#fff',
    fontSize: baseSize,
    x: horizontalOffset + lineLength + baseSize * 24, // 文字位置微调
    y: startY + 7.8 * verticalGap + offsetY - baseSize * 0.7, // 文字垂直居中
    textAlign: 'center'
  })
  group2.add(tankAreaText3)
  group2.add(rect16Copy)

  // horizontalConnector13Copy.stroke = '#00FF00'
  // switch13Copy.updateColor('#00FF00')

  leafer.add(group)
  leafer.add(group2)

  watch(
    scadaData,
    (newVal) => {
      console.log('🐯 ~ newVal:', newVal.JYDJBKZXV1042ST)
      // 乌尔禾泵站左侧

      horizontalLine0.stroke = '#9f998f'
      switch1_0.updateColor('#9f998f')
      verticalSegment0.stroke = '#9f998f'
      horizontalLine1.stroke = '#9f998f'
      switch1_1.updateColor('#9f998f')
      verticalSegment1.stroke = '#9f998f'
      horizontalLine2.stroke = '#9f998f'
      switch1_2.updateColor('#9f998f')
      verticalSegment2.stroke = '#9f998f'
      horizontalLine3.stroke = '#9f998f'
      switch1_3.updateColor('#9f998f')
      verticalSegment3.stroke = '#9f998f'
      horizontalLine4.stroke = '#9f998f'
      switch1_4.updateColor('#9f998f')
      verticalSegment4.stroke = '#9f998f'
      horizontalLine5.stroke = '#9f998f'
      switch1_5.updateColor('#9f998f')
      verticalSegment5.stroke = '#9f998f'
      horizontalConnector.stroke = '#9f998f'
      switch2.updateColor('#9f998f')
      rightVerticalLine1.stroke = '#9f998f'
      line0.stroke = '#9f998f'
      farRightVerticalLine1.stroke = '#9f998f'
      horizontalConnector2.stroke = '#9f998f'
      switch3.updateColor('#9f998f')

      // 乌尔禾B-1

      rightVerticalLine1.stroke = '#9f998f'
      line0.stroke = '#9f998f'
      farRightVerticalLine1.stroke = '#9f998f'
      horizontalConnector2.stroke = '#9f998f'
      switch3.updateColor('#9f998f')
      pump0.url = Pump

      // 乌尔禾B-2

      line1.stroke = '#9f998f'
      horizontalConnector2.stroke = '#9f998f'
      horizontalConnector2.stroke = '#9f998f'
      switch3.updateColor('#9f998f')
      pump1.url = Pump

      // 乌尔禾B-3

      line2.stroke = '#9f998f'
      farRightVerticalLine2.stroke = '#9f998f'
      rightVerticalLine2.stroke = '#9f998f'
      horizontalConnector2.stroke = '#9f998f'
      switch3.updateColor('#9f998f')
      pump2.url = Pump

      // 百克-V041
      horizontalConnector4.stroke = '#9f998f'
      switch4.updateColor('#9f998f')
      verticalLineV081_1.stroke = '#9f998f'
      horizontalConnectorV041.stroke = '#9f998f'
      verticalLine21.stroke = '#9f998f'
      switch14.updateColor('#9f998f')

      // 百克-V042 && 百克-B-1
      verticalLine22.stroke = '#9f998f'
      switch8.updateColor('#9f998f')
      switch15.updateColor('#9f998f')
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector12.stroke = '#9f998f'
      verticalLine9.stroke = '#9f998f'
      verticalLine7.stroke = '#9f998f'
      horizontalConnector91.stroke = '#9f998f'
      verticalShortLine0.stroke = '#9f998f'
      pump4.url = Pump

      // 百克-V042 && 百克-B-2
      verticalLine22.stroke = '#9f998f'
      switch8.updateColor('#9f998f')
      switch15.updateColor('#9f998f')
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector11.stroke = '#9f998f'
      verticalLine6.stroke = '#9f998f'
      verticalLine7.stroke = '#9f998f'
      horizontalConnector91.stroke = '#9f998f'
      verticalShortLine0.stroke = '#9f998f'
      pump5.url = Pump

      // 百克-V042 && 百克-B-3
      verticalLine22.stroke = '#9f998f'
      switch8.updateColor('#9f998f')
      switch15.updateColor('#9f998f')
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector10.stroke = '#9f998f'
      verticalLine5.stroke = '#9f998f'
      verticalLine6.stroke = '#9f998f'
      verticalLine7.stroke = '#9f998f'
      verticalLine10.stroke = '#9f998f'
      horizontalConnector91.stroke = '#9f998f'
      verticalShortLine0.stroke = '#9f998f'
      pump6.url = Pump

      // 百克-V049 && 百克-V081
      verticalLineV081_1.stroke = '#9f998f'
      verticalLineV081_2.stroke = '#9f998f'
      switch5.updateColor('#9f998f')
      horizontalConnectorV041.stroke = '#9f998f'
      horizontalConnector6_1.stroke = '#9f998f'
      verticalLineV081_1.stroke = '#9f998f'
      horizontalConnectorV049.stroke = '#9f998f'
      verticalLine23.stroke = '#9f998f'
      switch16.updateColor('#9f998f')

      // 百克-V082 && 百克-B-1
      switch6.updateColor('#9f998f')
      switch8.updateColor('#9f998f')
      verticalLine4.stroke = '#9f998f'
      verticalLine5.stroke = '#9f998f'
      verticalLine6.stroke = '#9f998f'
      verticalLine9.stroke = '#9f998f'
      horizontalConnector12.stroke = '#9f998f'
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector6_1.stroke = '#9f998f'
      horizontalConnector6_2.stroke = '#9f998f'
      pump4.url = Pump
      // 百克-V082 && 百克-B-2
      switch6.updateColor('#9f998f')
      switch8.updateColor('#9f998f')
      verticalLine4.stroke = '#9f998f'
      verticalLine5.stroke = '#9f998f'
      horizontalConnector11.stroke = '#9f998f'
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector6_1.stroke = '#9f998f'
      horizontalConnector6_2.stroke = '#9f998f'
      pump5.url = Pump
      // 百克-V082 && 百克-B-3
      switch6.updateColor('#9f998f')
      switch8.updateColor('#9f998f')
      verticalLine4.stroke = '#9f998f'
      verticalLine10.stroke = '#9f998f'
      horizontalConnector10.stroke = '#9f998f'
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector6_1.stroke = '#9f998f'
      horizontalConnector6_2.stroke = '#9f998f'
      pump6.url = Pump
      // 百克-V050 && 百克-B-1
      verticalLine24.stroke = '#9f998f'
      switch8.updateColor('#9f998f')
      switch17.updateColor('#9f998f')
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector12.stroke = '#9f998f'
      verticalLine9.stroke = '#9f998f'
      verticalLine7.stroke = '#9f998f'
      horizontalConnector91.stroke = '#9f998f'
      horizontalConnector92.stroke = '#9f998f'
      verticalShortLine1.stroke = '#9f998f'
      pump4.url = Pump
      // 百克-V050 && 百克-B-2
      verticalLine24.stroke = '#9f998f'
      switch8.updateColor('#9f998f')
      switch17.updateColor('#9f998f')
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector11.stroke = '#9f998f'
      verticalLine6.stroke = '#9f998f'
      verticalLine7.stroke = '#9f998f'
      horizontalConnector91.stroke = '#9f998f'
      horizontalConnector92.stroke = '#9f998f'
      verticalShortLine1.stroke = '#9f998f'
      pump5.url = Pump
      // 百克-V050 && 百克-B-3
      verticalLine24.stroke = '#9f998f'
      switch8.updateColor('#9f998f')
      switch17.updateColor('#9f998f')
      horizontalConnector13_1.stroke = '#9f998f'
      horizontalConnector13_2.stroke = '#9f998f'
      horizontalConnector10.stroke = '#9f998f'
      verticalLine5.stroke = '#9f998f'
      verticalLine6.stroke = '#9f998f'
      verticalLine7.stroke = '#9f998f'
      verticalLine10.stroke = '#9f998f'
      horizontalConnector91.stroke = '#9f998f'
      horizontalConnector92.stroke = '#9f998f'
      verticalShortLine1.stroke = '#9f998f'
      pump6.url = Pump

      // // 百克-49

      // horizontalConnector4.stroke = '#9f998f'
      // switch4.updateColor('#9f998f')
      // verticalLineV081_1.stroke = '#9f998f'
      // horizontalConnectorV049.stroke = '#9f998f'
      // verticalLine23.stroke = '#9f998f'
      // switch16.updateColor('#9f998f')

      // // 百克-50 && 百克B-1

      // verticalLine24.stroke = '#9f998f'
      // switch8.updateColor('#9f998f')
      // switch17.updateColor('#9f998f')
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector12.stroke = '#9f998f'
      // verticalLine9.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // horizontalConnector92.stroke = '#9f998f'
      // verticalShortLine1.stroke = '#9f998f'
      // pump4.url = Pump

      // // 百克-50 && 百克B-2

      // verticalLine24.stroke = '#9f998f'
      // switch8.updateColor('#9f998f')
      // switch17.updateColor('#9f998f')
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector11.stroke = '#9f998f'
      // verticalLine6.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // horizontalConnector92.stroke = '#9f998f'
      // verticalShortLine1.stroke = '#9f998f'
      // pump5.url = Pump

      // // 百克-50 && 百克B-3

      // verticalLine24.stroke = '#9f998f'
      // switch8.updateColor('#9f998f')
      // switch17.updateColor('#9f998f')
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector10.stroke = '#9f998f'
      // verticalLine5.stroke = '#9f998f'
      // verticalLine6.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // verticalLine10.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // horizontalConnector92.stroke = '#9f998f'
      // verticalShortLine1.stroke = '#9f998f'
      // pump6.url = Pump

      // // 百克-41 && 百克-81

      // verticalLineV081_1.stroke = '#9f998f'
      // verticalLineV081_2.stroke = '#9f998f'
      // switch5.updateColor('#9f998f')
      // horizontalConnectorV041.stroke = '#9f998f'
      // verticalLine21.stroke = '#9f998f'
      // switch14.updateColor('#9f998f')
      // horizontalConnector6_1.stroke = '#9f998f'

      // // 百克-42 && 百克-82

      // switch6.updateColor('#9f998f')
      // verticalLine4.stroke = '#9f998f'
      // verticalLine5.stroke = '#9f998f'
      // verticalLine6.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // verticalLine22.stroke = '#9f998f'
      // verticalShortLine0.stroke = '#9f998f'
      // switch15.updateColor('#9f998f')
      // horizontalConnector6_1.stroke = '#9f998f'
      // horizontalConnector6_2.stroke = '#9f998f'

      // // 百克-B-1 && 百克-82

      // switch6.updateColor('#9f998f')
      // switch8.updateColor('#9f998f')
      // verticalLine4.stroke = '#9f998f'
      // verticalLine5.stroke = '#9f998f'
      // verticalLine6.stroke = '#9f998f'
      // verticalLine9.stroke = '#9f998f'
      // horizontalConnector12.stroke = '#9f998f'
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector6_1.stroke = '#9f998f'
      // horizontalConnector6_2.stroke = '#9f998f'
      // pump4.url = Pump

      // // 百克-B-2 && 百克-82

      // switch6.updateColor('#9f998f')
      // switch8.updateColor('#9f998f')
      // verticalLine4.stroke = '#9f998f'
      // verticalLine5.stroke = '#9f998f'
      // horizontalConnector11.stroke = '#9f998f'
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector6_1.stroke = '#9f998f'
      // horizontalConnector6_2.stroke = '#9f998f'
      // pump5.url = Pump

      // // 百克-B-3 && 百克-82

      // switch6.updateColor('#9f998f')
      // switch8.updateColor('#9f998f')
      // verticalLine4.stroke = '#9f998f'
      // verticalLine10.stroke = '#9f998f'
      // horizontalConnector10.stroke = '#9f998f'
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector6_1.stroke = '#9f998f'
      // horizontalConnector6_2.stroke = '#9f998f'
      // pump6.url = Pump

      // // 百克-B-1 && 百克-42

      // verticalLine22.stroke = '#9f998f'
      // switch8.updateColor('#9f998f')
      // switch15.updateColor('#9f998f')
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector12.stroke = '#9f998f'
      // verticalLine9.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // verticalShortLine0.stroke = '#9f998f'
      // pump4.url = Pump

      // // 百克-B-2 && 百克-42

      // verticalLine22.stroke = '#9f998f'
      // switch8.updateColor('#9f998f')
      // switch15.updateColor('#9f998f')
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector11.stroke = '#9f998f'
      // verticalLine6.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // verticalShortLine0.stroke = '#9f998f'
      // pump5.url = Pump

      // // 百克-B-3 && 百克-42

      // verticalLine22.stroke = '#9f998f'
      // switch8.updateColor('#9f998f')
      // switch15.updateColor('#9f998f')
      // horizontalConnector13_1.stroke = '#9f998f'
      // horizontalConnector13_2.stroke = '#9f998f'
      // horizontalConnector10.stroke = '#9f998f'
      // verticalLine5.stroke = '#9f998f'
      // verticalLine6.stroke = '#9f998f'
      // verticalLine7.stroke = '#9f998f'
      // verticalLine10.stroke = '#9f998f'
      // horizontalConnector91.stroke = '#9f998f'
      // verticalShortLine0.stroke = '#9f998f'
      // pump6.url = Pump

      // 81#泵站左侧

      verticalSegmentCopy0.stroke = '#9f998f'
      verticalSegmentCopy1.stroke = '#9f998f'
      verticalSegmentCopy2.stroke = '#9f998f'
      verticalSegmentCopy3.stroke = '#9f998f'
      lineCopy0.stroke = '#9f998f'
      switch1Copy0.updateColor('#9f998f')
      lineCopy1.stroke = '#9f998f'
      switch1Copy1.updateColor('#9f998f')
      lineCopy2.stroke = '#9f998f'
      switch1Copy2.updateColor('#9f998f')
      lineCopy3.stroke = '#9f998f'
      switch1Copy3.updateColor('#9f998f')
      horizontalConnectorCopy.stroke = '#9f998f'
      switch2Copy.updateColor('#9f998f')
      horizontalConnector2Copy.stroke = '#9f998f'
      switch3Copy.updateColor('#9f998f')
      rightVerticalLinesCopy1.stroke = '#9f998f'
      lineCopy00.stroke = '#9f998f'
      farRightVerticalLines1Copy1.stroke = '#9f998f'

      // 81# B-1

      rightVerticalLinesCopy1.stroke = '#9f998f'
      lineCopy00.stroke = '#9f998f'
      farRightVerticalLines1Copy1.stroke = '#9f998f'
      pumpCopy0.url = Pump

      // 81# B-2

      lineCopy11.stroke = '#9f998f'
      pumpCopy1.url = Pump

      // 81# B-3

      rightVerticalLinesCopy2.stroke = '#9f998f'
      lineCopy22.stroke = '#9f998f'
      farRightVerticalLines1Copy2.stroke = '#9f998f'
      pumpCopy2.url = Pump

      // 701 1046

      horizontalConnector4Copy.stroke = '#9f998f'
      switch4Copy.updateColor('#9f998f')
      verticalLineV1046.stroke = '#9f998f'
      switchV1046.updateColor('#9f998f')

      // 701 1068

      horizontalConnector4Copy.stroke = '#9f998f'
      switch4Copy.updateColor('#9f998f')
      verticalLine2Copy.stroke = '#9f998f'
      switch5Copy.updateColor('#9f998f')
      horizontalConnector12Copy.stroke = '#9f998f'
      horizontalConnector5Copy1.stroke = '#9f998f'

      // 701 1129

      horizontalConnector4Copy.stroke = '#9f998f'
      switch4Copy.updateColor('#9f998f')
      horizontalConnector5Copy1.stroke = '#9f998f'
      horizontalConnector5Copy2.stroke = '#9f998f'
      switch6Copy.updateColor('#9f998f')
      verticalLine3Copy1.stroke = '#9f998f'
      horizontalConnector7Copy.stroke = '#9f998f'
      switch7Copy.updateColor('#9f998f')

      // 701 1128

      horizontalConnector7Copy.stroke = '#9f998f'
      switch7Copy.updateColor('#9f998f')
      verticalLine3Copy2.stroke = '#9f998f'
      horizontalConnector8Copy.stroke = '#9f998f'
      switch8Copy.updateColor('#9f998f')
      horizontalConnector10Copy.stroke = '#9f998f'
      switch10Copy.updateColor('#9f998f')

      // 701 1045

      horizontalConnector8Copy.stroke = '#9f998f'
      switch8Copy.updateColor('#9f998f')
      horizontalConnector9Copy.stroke = '#9f998f'
      switchV1045.updateColor('#9f998f')
      verticalLine4Copy.stroke = '#9f998f'

      // 总站 1100

      horizontalConnector13Copy.stroke = '#9f998f'
      switch13Copy.updateColor('#9f998f')

      // 乌尔禾B-1
      if (newVal.WEHXYZP101ST === 1) {
        horizontalLine0.stroke = '#00FF00'
        switch1_0.updateColor('#00FF00')
        verticalSegment0.stroke = '#00FF00'
        horizontalLine1.stroke = '#00FF00'
        switch1_1.updateColor('#00FF00')
        verticalSegment1.stroke = '#00FF00'
        horizontalLine2.stroke = '#00FF00'
        switch1_2.updateColor('#00FF00')
        verticalSegment2.stroke = '#00FF00'
        horizontalLine3.stroke = '#00FF00'
        switch1_3.updateColor('#00FF00')
        verticalSegment3.stroke = '#00FF00'
        horizontalLine4.stroke = '#00FF00'
        switch1_4.updateColor('#00FF00')
        verticalSegment4.stroke = '#00FF00'
        horizontalLine5.stroke = '#00FF00'
        switch1_5.updateColor('#00FF00')
        verticalSegment5.stroke = '#00FF00'
        horizontalConnector.stroke = '#00FF00'
        switch2.updateColor('#00FF00')
        rightVerticalLine1.stroke = '#00FF00'
        line0.stroke = '#00FF00'
        farRightVerticalLine1.stroke = '#00FF00'
        horizontalConnector2.stroke = '#00FF00'
        switch3.updateColor('#00FF00')
        pump0.url = Pump1
      }
      // 乌尔禾B-2
      if (newVal.WEHXYZP102ST === 1) {
        horizontalLine0.stroke = '#00FF00'
        switch1_0.updateColor('#00FF00')
        verticalSegment0.stroke = '#00FF00'
        horizontalLine1.stroke = '#00FF00'
        switch1_1.updateColor('#00FF00')
        verticalSegment1.stroke = '#00FF00'
        horizontalLine2.stroke = '#00FF00'
        switch1_2.updateColor('#00FF00')
        verticalSegment2.stroke = '#00FF00'
        horizontalLine3.stroke = '#00FF00'
        switch1_3.updateColor('#00FF00')
        verticalSegment3.stroke = '#00FF00'
        horizontalLine4.stroke = '#00FF00'
        switch1_4.updateColor('#00FF00')
        verticalSegment4.stroke = '#00FF00'
        horizontalLine5.stroke = '#00FF00'
        switch1_5.updateColor('#00FF00')
        verticalSegment5.stroke = '#00FF00'
        horizontalConnector.stroke = '#00FF00'
        switch2.updateColor('#00FF00')
        line1.stroke = '#00FF00'
        horizontalConnector2.stroke = '#00FF00'
        horizontalConnector2.stroke = '#00FF00'
        switch3.updateColor('#00FF00')
        pump1.url = Pump1
      }
      // 乌尔禾B-3
      if (newVal.WEHXYZP103ST === 1) {
        horizontalLine0.stroke = '#00FF00'
        switch1_0.updateColor('#00FF00')
        verticalSegment0.stroke = '#00FF00'
        horizontalLine1.stroke = '#00FF00'
        switch1_1.updateColor('#00FF00')
        verticalSegment1.stroke = '#00FF00'
        horizontalLine2.stroke = '#00FF00'
        switch1_2.updateColor('#00FF00')
        verticalSegment2.stroke = '#00FF00'
        horizontalLine3.stroke = '#00FF00'
        switch1_3.updateColor('#00FF00')
        verticalSegment3.stroke = '#00FF00'
        horizontalLine4.stroke = '#00FF00'
        switch1_4.updateColor('#00FF00')
        verticalSegment4.stroke = '#00FF00'
        horizontalLine5.stroke = '#00FF00'
        switch1_5.updateColor('#00FF00')
        verticalSegment5.stroke = '#00FF00'
        horizontalConnector.stroke = '#00FF00'
        switch2.updateColor('#00FF00')
        line2.stroke = '#00FF00'
        farRightVerticalLine2.stroke = '#00FF00'
        rightVerticalLine2.stroke = '#00FF00'
        horizontalConnector2.stroke = '#00FF00'
        switch3.updateColor('#00FF00')
        pump2.url = Pump1
      }

      // 百克-V041
      if (newVal.JYDJBKZXV1041ST === 1) {
        horizontalConnector4.stroke = '#00FF00'
        switch4.updateColor('#00FF00')
        verticalLineV081_1.stroke = '#00FF00'
        horizontalConnectorV041.stroke = '#00FF00'
        verticalLine21.stroke = '#00FF00'
        switch14.updateColor('#00FF00')
      }

      // 百克-V049 && 百克-V081
      if (newVal.JYDJBKZXV2049ST === 1 && newVal.JYDJBKZXV0081ST === 1) {
        verticalLineV081_1.stroke = '#00FF00'
        verticalLineV081_2.stroke = '#00FF00'
        switch5.updateColor('#00FF00')
        horizontalConnectorV041.stroke = '#00FF00'
        horizontalConnector6_1.stroke = '#00FF00'
        verticalLineV081_1.stroke = '#00FF00'
        horizontalConnectorV049.stroke = '#00FF00'
        verticalLine23.stroke = '#00FF00'
        switch16.updateColor('#00FF00')
      }

      // // 百克-49
      // if (newVal.JYDJBKZXV2049ST === 1) {
      //   horizontalConnector4.stroke = '#00FF00'
      //   switch4.updateColor('#00FF00')
      //   verticalLineV081_1.stroke = '#00FF00'
      //   horizontalConnectorV049.stroke = '#00FF00'
      //   verticalLine23.stroke = '#00FF00'
      //   switch16.updateColor('#00FF00')
      // }
      // 百克-50 && 百克B-1
      if (newVal.JYDJBKZXV2050ST === 1 && newVal.JYDJBKZB3301ST === 1) {
        verticalLine24.stroke = '#00FF00'
        switch8.updateColor('#00FF00')
        switch17.updateColor('#00FF00')
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector12.stroke = '#00FF00'
        verticalLine9.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        horizontalConnector92.stroke = '#00FF00'
        verticalShortLine1.stroke = '#00FF00'
        pump4.url = Pump1
      }
      // 百克-50 && 百克B-2
      if (newVal.JYDJBKZXV2050ST === 1 && newVal.JYDJBKZB3302ST === 1) {
        verticalLine24.stroke = '#00FF00'
        switch8.updateColor('#00FF00')
        switch17.updateColor('#00FF00')
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector11.stroke = '#00FF00'
        verticalLine6.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        horizontalConnector92.stroke = '#00FF00'
        verticalShortLine1.stroke = '#00FF00'
        pump5.url = Pump1
      }
      // 百克-50 && 百克B-3
      if (newVal.JYDJBKZXV2050ST === 1 && newVal.JYDJBKZB3303ST === 1) {
        verticalLine24.stroke = '#00FF00'
        switch8.updateColor('#00FF00')
        switch17.updateColor('#00FF00')
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector10.stroke = '#00FF00'
        verticalLine5.stroke = '#00FF00'
        verticalLine6.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        verticalLine10.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        horizontalConnector92.stroke = '#00FF00'
        verticalShortLine1.stroke = '#00FF00'
        pump6.url = Pump1
      }
      // 百克-41 && 百克-81
      if (newVal.JYDJBKZXV1041ST === 1 && newVal.JYDJBKZXV0081ST === 1) {
        verticalLineV081_1.stroke = '#00FF00'
        verticalLineV081_2.stroke = '#00FF00'
        switch5.updateColor('#00FF00')
        horizontalConnectorV041.stroke = '#00FF00'
        verticalLine21.stroke = '#00FF00'
        switch14.updateColor('#00FF00')
        horizontalConnector6_1.stroke = '#00FF00'
      }
      // 百克-42 && 百克-82
      if (newVal.JYDJBKZXV1042ST === 1 && newVal.JYDJBKZXV0082ST === 1) {
        switch6.updateColor('#00FF00')
        verticalLine4.stroke = '#00FF00'
        verticalLine5.stroke = '#00FF00'
        verticalLine6.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        verticalLine22.stroke = '#00FF00'
        verticalShortLine0.stroke = '#00FF00'
        switch15.updateColor('#00FF00')
        horizontalConnector6_1.stroke = '#00FF00'
        horizontalConnector6_2.stroke = '#00FF00'
      }
      // 百克-B-1 && 百克-82
      if (newVal.JYDJBKZB3301ST === 1 && newVal.JYDJBKZXV0082ST === 1) {
        switch6.updateColor('#00FF00')
        switch8.updateColor('#00FF00')
        verticalLine4.stroke = '#00FF00'
        verticalLine5.stroke = '#00FF00'
        verticalLine6.stroke = '#00FF00'
        verticalLine9.stroke = '#00FF00'
        horizontalConnector12.stroke = '#00FF00'
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector6_1.stroke = '#00FF00'
        horizontalConnector6_2.stroke = '#00FF00'
        pump4.url = Pump1
      }
      // 百克-B-2 && 百克-82
      if (newVal.JYDJBKZB3302ST === 1 && newVal.JYDJBKZXV0082ST === 1) {
        switch6.updateColor('#00FF00')
        switch8.updateColor('#00FF00')
        verticalLine4.stroke = '#00FF00'
        verticalLine5.stroke = '#00FF00'
        horizontalConnector11.stroke = '#00FF00'
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector6_1.stroke = '#00FF00'
        horizontalConnector6_2.stroke = '#00FF00'
        pump5.url = Pump1
      }
      // 百克-B-3 && 百克-82
      if (newVal.JYDJBKZB3303ST === 1 && newVal.JYDJBKZXV0082ST === 1) {
        switch6.updateColor('#00FF00')
        switch8.updateColor('#00FF00')
        verticalLine4.stroke = '#00FF00'
        verticalLine10.stroke = '#00FF00'
        horizontalConnector10.stroke = '#00FF00'
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector6_1.stroke = '#00FF00'
        horizontalConnector6_2.stroke = '#00FF00'
        pump6.url = Pump1
      }
      // 百克-B-1 && 百克-42
      if (newVal.JYDJBKZB3301ST === 1 && newVal.JYDJBKZXV1042ST === 1) {
        verticalLine22.stroke = '#00FF00'
        switch8.updateColor('#00FF00')
        switch15.updateColor('#00FF00')
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector12.stroke = '#00FF00'
        verticalLine9.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        verticalShortLine0.stroke = '#00FF00'
        pump4.url = Pump1
      }
      // 百克-B-2 && 百克-42
      if (newVal.JYDJBKZB3302ST === 1 && newVal.JYDJBKZXV1042ST === 1) {
        verticalLine22.stroke = '#00FF00'
        switch8.updateColor('#00FF00')
        switch15.updateColor('#00FF00')
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector11.stroke = '#00FF00'
        verticalLine6.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        verticalShortLine0.stroke = '#00FF00'
        pump5.url = Pump1
      }
      // 百克-B-3 && 百克-42
      if (newVal.JYDJBKZB3303ST === 1 && newVal.JYDJBKZXV1042ST === 1) {
        verticalLine22.stroke = '#00FF00'
        switch8.updateColor('#00FF00')
        switch15.updateColor('#00FF00')
        horizontalConnector13_1.stroke = '#00FF00'
        horizontalConnector13_2.stroke = '#00FF00'
        horizontalConnector10.stroke = '#00FF00'
        verticalLine5.stroke = '#00FF00'
        verticalLine6.stroke = '#00FF00'
        verticalLine7.stroke = '#00FF00'
        verticalLine10.stroke = '#00FF00'
        horizontalConnector91.stroke = '#00FF00'
        verticalShortLine0.stroke = '#00FF00'
        pump6.url = Pump1
      }
      // 81# B-1
      if (newVal.JYDBYZB050201ST === 1 && newVal.JYDBYZESDV050201ST === 1) {
        verticalSegmentCopy0.stroke = '#00FF00'
        verticalSegmentCopy1.stroke = '#00FF00'
        verticalSegmentCopy2.stroke = '#00FF00'
        verticalSegmentCopy3.stroke = '#00FF00'
        lineCopy0.stroke = '#00FF00'
        switch1Copy0.updateColor('#00FF00')
        lineCopy1.stroke = '#00FF00'
        switch1Copy1.updateColor('#00FF00')
        lineCopy2.stroke = '#00FF00'
        switch1Copy2.updateColor('#00FF00')
        lineCopy3.stroke = '#00FF00'
        switch1Copy3.updateColor('#00FF00')
        horizontalConnectorCopy.stroke = '#00FF00'
        switch2Copy.updateColor('#00FF00')
        horizontalConnector2Copy.stroke = '#00FF00'
        switch3Copy.updateColor('#00FF00')
        rightVerticalLinesCopy1.stroke = '#00FF00'
        lineCopy00.stroke = '#00FF00'
        farRightVerticalLines1Copy1.stroke = '#00FF00'
        pumpCopy0.url = Pump1
      }
      // 81# B-2
      if (newVal.JYDBYZB050202ST === 1 && newVal.JYDBYZESDV050201ST === 1) {
        verticalSegmentCopy0.stroke = '#00FF00'
        verticalSegmentCopy1.stroke = '#00FF00'
        verticalSegmentCopy2.stroke = '#00FF00'
        verticalSegmentCopy3.stroke = '#00FF00'
        lineCopy0.stroke = '#00FF00'
        switch1Copy0.updateColor('#00FF00')
        lineCopy1.stroke = '#00FF00'
        switch1Copy1.updateColor('#00FF00')
        lineCopy2.stroke = '#00FF00'
        switch1Copy2.updateColor('#00FF00')
        lineCopy3.stroke = '#00FF00'
        switch1Copy3.updateColor('#00FF00')
        horizontalConnectorCopy.stroke = '#00FF00'
        switch2Copy.updateColor('#00FF00')
        horizontalConnector2Copy.stroke = '#00FF00'
        switch3Copy.updateColor('#00FF00')
        lineCopy11.stroke = '#00FF00'
        pumpCopy1.url = Pump1
      }
      // 81# B-3
      if (newVal.JYDBYZB050203ST === 1 && newVal.JYDBYZESDV050201ST === 1) {
        verticalSegmentCopy0.stroke = '#00FF00'
        verticalSegmentCopy1.stroke = '#00FF00'
        verticalSegmentCopy2.stroke = '#00FF00'
        verticalSegmentCopy3.stroke = '#00FF00'
        lineCopy0.stroke = '#00FF00'
        switch1Copy0.updateColor('#00FF00')
        lineCopy1.stroke = '#00FF00'
        switch1Copy1.updateColor('#00FF00')
        lineCopy2.stroke = '#00FF00'
        switch1Copy2.updateColor('#00FF00')
        lineCopy3.stroke = '#00FF00'
        switch1Copy3.updateColor('#00FF00')
        horizontalConnectorCopy.stroke = '#00FF00'
        switch2Copy.updateColor('#00FF00')
        horizontalConnector2Copy.stroke = '#00FF00'
        switch3Copy.updateColor('#00FF00')
        rightVerticalLinesCopy2.stroke = '#00FF00'
        lineCopy22.stroke = '#00FF00'
        farRightVerticalLines1Copy2.stroke = '#00FF00'
        pumpCopy2.url = Pump1
      }
      // 701 1046
      if (newVal.KWXA701PV1046VP === 1) {
        horizontalConnector4Copy.stroke = '#00FF00'
        switch4Copy.updateColor('#00FF00')
        verticalLineV1046.stroke = '#00FF00'
        switchV1046.updateColor('#00FF00')
      }
      // 701 1068
      if (newVal.KWXA701XV1068ST === 1) {
        horizontalConnector4Copy.stroke = '#00FF00'
        switch4Copy.updateColor('#00FF00')
        verticalLine2Copy.stroke = '#00FF00'
        switch5Copy.updateColor('#00FF00')
        horizontalConnector12Copy.stroke = '#00FF00'
        horizontalConnector5Copy1.stroke = '#00FF00'
      }
      // 701 1129
      if (newVal.KWXA701XV1129ST === 1) {
        horizontalConnector4Copy.stroke = '#00FF00'
        switch4Copy.updateColor('#00FF00')
        horizontalConnector5Copy1.stroke = '#00FF00'
        horizontalConnector5Copy2.stroke = '#00FF00'
        switch6Copy.updateColor('#00FF00')
        verticalLine3Copy1.stroke = '#00FF00'
        horizontalConnector7Copy.stroke = '#00FF00'
        switch7Copy.updateColor('#00FF00')
      }
      // 701 1128
      if (newVal.KWXA701XV1128ST === 1) {
        horizontalConnector7Copy.stroke = '#00FF00'
        switch7Copy.updateColor('#00FF00')
        verticalLine3Copy2.stroke = '#00FF00'
        horizontalConnector8Copy.stroke = '#00FF00'
        switch8Copy.updateColor('#00FF00')
        horizontalConnector10Copy.stroke = '#00FF00'
        switch10Copy.updateColor('#00FF00')
      }
      // 701 1045
      if (newVal.KWXA701PV1045VP === 1) {
        horizontalConnector8Copy.stroke = '#00FF00'
        switch8Copy.updateColor('#00FF00')
        horizontalConnector9Copy.stroke = '#00FF00'
        switchV1045.updateColor('#00FF00')
        verticalLine4Copy.stroke = '#00FF00'
      }
      // 总站 1100
      if (newVal.KDXZHZSV1101ST === 1) {
        horizontalConnector13Copy.stroke = '#00FF00'
        switch13Copy.updateColor('#00FF00')
      }
    },
    { immediate: true },
    { deep: true }
  )
})

// 在组件销毁时清除定时器
onUnmounted(() => {
  if (updateTimer) {
    clearInterval(updateTimer)
    updateTimer = null
  }
})
</script>

<style lang="scss" scoped></style>
